Can't Connect from Shell to Cluster

I ran this connection string:

mongo “mongodb+srv://” --username m001-student

I was prompted for the password, and received this error: bad authentication failed. I can’t connect via Compass either.


There is no issue with your connect string
I am able to connect
Did you type correct password when it prompted?
May be some invalid character came in when cut & paste?

Hi @Alison_09914,

You must have entered incorrect password because I am able to connect to your cluster using the connection string that you have provided.

Please use this connection string to connect. I have appended the password to the connection string itself.

mongo "mongodb+srv://" --username m001-student -p m001-mongodb-basics

Please use this password when you are connecting from Compass m001-mongodb-basics.

If you have any other issue, please feel free to get back to us.

Happy Learning :slight_smile:

Shubham Ranjan
Curriculum Support Engineer

1 Like