AuthenticationFailed: bad auth

I can not connect to my Atlas cluster via IDE space.
I copied the connection string:

mongo “mongodb+srv://sandbox.fgrgdek.mongodb.net/myFirstDatabase” --username m001-student

then pasted my password and get this error:

Error: can't connect to new replica set master [ac-wo7ynuy-shard-00-01.fgrgdek.mongodb.net:27017], err: AuthenticationFailed: bad auth : Authentication failed. :
connect@src/mongo/shell/mongo.js:374:17
@(connect):2:6
exception: connect failed
exiting with code 1

Bad authentication means wrong combination of userid and password
Check again

I copied and pasted my username and password from ‘Network access’ on Mongo Atlas UI

If you are having issues with copy & paste try to connect by --password your_pwd option in your connect string

Thank you. I changed my password and I was able to connect after that.

1 Like