Bad auth : authentication failed; I can't connect to my cluster from mongosh or compass

I cant connect to my cluster with Compass nor mongosh. I got an authentification error (bad auth : authentication failed), but I don’t know why: the user is given by Atlas (along with the whole string: mongodb+srv://MyUser:MyPass@cluster0.SomeID.mongodb.net/) and the password is correct and only alphanumeric (I changed it so no symbol messes it up). So I have no idea of what is happening.
I’m trying to connect from both Arch linux and Xubuntu. Both from the same IP (which is allowed to access the cluster, as Atlass says), and in both I have installed MongoDB, MongoSH and MongoDB Compass. Everything is up to date.
I am the only user, and I’m usin a free plan to learn how to use mongodb.
I really have no clue of what can be happening here

Solved: I created this database (my first ever) months ago and forgot about the database credentials being different from MongoDB Atlas, so I was trying to use my Atlas credentials on the database. Going to the Database Access section and editing the user let me reset the password. Now everything works as expected.

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.