Bad auth : authentication failed MongoDB Atlas

Hi community,

I created a database project and then tried to connect it with Compass as instructed. It did not work. After writing the password after removing the <>. It said “bad auth”. Any clues how to fix this in 2023?
Or any community question you can recommend where this problem was answered well?

Many thanks

Bad auth means wrong user id or password
Have you created DB user?
Use that user to login to your DB
Try with mongosh shell if you can connect or not

1 Like

hey, @Ramachandra_Tummala , so in my mongodb atlas, i have a password for the atlas authentication and another one in the database access, now if i try to connect with the nodejs application, its taking the atlas authentication and not the db user password,despite having mentioned in the documentation that “Replace with the password for the 245120733077 user. Ensure any option params are URL encoded