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 (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:


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


1 Like

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

My connection string


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


Thanks, it worked!!!


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