7

My error goes :

mongo "mongodb+srv://cluster0-ts5b5.mongodb.net/test" --username admin-David MongoDB shell version v4.0.6 Enter password: Cannot get console mode 6 

I meant to write password there but I can't proceed to password so I can't connect to Atlas at all. Please sort this problem!!

1 Answer 1

13

I ran into this same problem today, I was able to log in by including the password in the same statement where the url and username are.

So in your case try doing this:

mongo "mongodb+srv://cluster0-ts5b5.mongodb.net/test" --username admin-David --password <yourPasswordHere> 

That worked for me, hopefully it helps!

MongoDB docs reference: https://docs.mongodb.com/manual/reference/program/mongo/#cmdoption-mongo-username

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.