Cannot to the class atlas cluster from the mongo shell

I trying to use the following commands

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

I thought maybe the above command needs a one ‘-’ more so I modified
mongo “mongodb+srv://” --username m001-student --password m001-mongodb-basics

But the same errors appears


I also tried the following string connection:

mongo “mongodb://,,” --authenticationDatabase admin --ssl --username m001-student --password m001-mongodb-basics

Becasuse of this advice “Starting in MongoDB version 4.2, the ssl option has been deprecated and the new corresponding tls option has been added”, I modified the string to:

mongo “mongodb://,,” --authenticationDatabase admin --tls --username m001-student --password m001-mongodb-basics

My versión is 4.2.5.

Thanks in advance for your help.

Please the first command you fired in your snapshot
You are at mongo prompt when you fired mongo and you are trying to connect to Class cluster
It won’t work
Please exit and run from your os prompt
Are you not using Vagrant?

1 Like

Thank you! It works!

Closing this thread as the issue has been resolved.