Unable to connect to Mongo DB Atlas

I am not able to connect Mongo Db compass to atlas. It says authentication failed. I doubled checked my password and username, and its fine.

My connection string is mongodb+srv://:@cluster0.w6vx0.mongodb.net/test

I have checked my username and password , it is fine. network address is 0.0.0.0/0 (includes your current IP address) in atlas.

Mongo DB role is readWriteAnyDatabase@admin

But I am facing authentication Failed in Mongo DB.

Hi @Amen_Naqvi,

Welcome to the MongoDB Community Forums! :leaves:

Kindly include your username and password you created as well into this string. Since they are not present in your string, hence it gives authentication failed as an error.

It will be like this:

mongodb+srv://<username>:<password>@cluster0.w6vx0.mongodb.net/test

Kindly let us know if you still face any issues. Feel free to reach out for anything else as well.

Regards,
Satyam

1 Like

and my password in plain text english. So, no url encoding is needed.

My connection string

mongodb+srv://<system>:<system>@cluster0.w6vx0.mongodb.net/test

if your user name is system then it is system, not <system>. ditto for the password

4 Likes

Thanks, it worked!!!

2 Likes

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.