Mongodb: failed to connect to server on first connect

Adding one more answer as the solution is from different contexts:

MongoDb Atlas problem solution

I connected to MongoDB Atlas and whitelisted my machine’s IP by following the below steps:

  • Go to the security tab

the security tab

  • Go to the network access tab under the security tab

network access tab under security tab

  • Go to the IP whitelist tab

IP whitelist tab

  • Enter the IP address of your machine

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)