Error when trying to connect to db.
See original GitHub issuePrerequisites
- I have written a descriptive issue title
Mongoose version
6.6.0
Node.js version
18.x
MongoDB version
5.0.12
Operating system
Windows
Operating system version (i.e. 20.04, 11.3, 10)
10
Issue
So when I try to connect to my db I have an error
Error: querySrv ECONNREFUSED _mongodb._tcp.cluster0.0ltupff.mongodb.net
at QueryReqWrap.onresolve [as oncomplete] (node:dns:303:19) {
errno: undefined,
code: 'ECONNREFUSED',
syscall: 'querySrv',
hostname: '_mongodb._tcp.cluster0.0ltupff.mongodb.net'
}
link that I use to connect is
mongodb+srv://<username>:<password>@cluster0.0ltupff.mongodb.net/Cluster0?retryWrites=true&w=majority
And yes, I have a correct username and password. My IP is allowed too.
Issue Analytics
- State:
- Created a year ago
- Comments:29
Top Results From Across the Web
How to Fix Error Establishing a Database Connection Error
The error establishing a database connection error basically means that for some reason or another the PHP code was unable to connect to...
Read more >How to Fix the Error Establishing a Database Connection in ...
The 'Error establishing a database connection' issue can be caused by incorrect database information in your WordPress settings, corrupt ...
Read more >Error establishing a database connection
This error means that your website files (on the webserver) are not able to connect to your database (on the database server).
Read more >5 Ways to Fix "Error Establishing a Database Connection" in ...
How To Fix “Error Establishing a Database Connection” · Step 1: Get In Touch With Your Web Host Provider · Step 2: Check...
Read more >Error: 'Failed to connect to database' when attempting to ...
SOLUTION · A network firewall is preventing the connection to the SQL Server (when the network path to the SQL Server will traverse...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Funny thing, my friend logged in without trouble…
I just moved my bot to server on digital ocean i still can’t Access db from my pc but anyways.
I hate autocorrect on phone…