Authentication failed type

This is kishan
while connecting to mongodb it is showing authentication failed can anyone help with this

May be the login credentials are not correct
Make sure no extra spaces

Hi kishan_15003,

Don’t copy/paste the password as there might be a chance that whitespace or some special character is appended.

username: m001-student
password: m001-mongodb-basics

Also, try connecting from command-line using the following connection string: be careful about the double quotes, just replace them after pasting to the command line:

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

Let me know if you still face any issue.


It looks like there is a space at the beginning of the username