Hi, I’m new here. I’m a student and I have MongoDB Atlas and MongoDB for VS Code installed on a mac. I’m having difficulty installing Compass and Shell. My instructor doesn’t have instructions for mac users. I’ve looked at several tutorials and gotten more confused.
I’m using the username and password that I use for Atlas and to connect in VS Code. In VS Code I am "currently connected to mongodb+srv://username/password@sandbox.vd7qxrw.mongodb.net. I can see “MongoDB Playground” but have been unable to use it.
When I try and install Compass I get error message “bad auth:authentication failed”.
Any help is appreciated. Thank you!
This is so confusing as I can see the databases/collection in Atlas.
This error generally indicates incorrect credentials being entered. You can try troubleshooting it by creating another test database user with no special characters in the password (only for troubleshooting purposes) to see if you’re able to log in via compass with those new credentials. More information on the Configure Database Users documentation which includes adding and modifying database users.
Thank you. My password doesn’t have any special characters. I was going to uninstall but it seems I wouldn’t be able to create a new account for a few days and I’m currently taking a course that requires MongoDB.
You can then click the red highlighted Database Access tab and re-configure Database User from here.
However, I’m not sure of the exact details of the course you’re following. It could be a case where the course has a pre-created cluster with database user credentials they provide to connect to said cluster. If it’s a cluster provided by the course then please let me know with any further information regarding the course.
Is this cluster under the course creator’s Atlas account or your own Atlas account?
If it’s your own cluster and you’re using the same credentials, i would then double check the connection string is correct. From the image in step 3. in my above response, you’ll also see a “Connect” button to the cluster if it’s your own cluster. You can then follow the connect modal and grab the connection string to be used in MongoDB Compass.
Do you have access to the Database Deployment for this “sandbox” cluster? I.e. can you see it when logged in the Atlas Web UI? If you can provide any screenshots, that would be helpful too (redact any personal or sensitive information before posting here).
When I’m logged in, I see my name in the upper right corner and when I click on Database this screen is returned. When I click “Browse Collections” I can see the ones for my class.
One is not required for the other. I assume the course is trying to get you to do something in VS code and perhaps another in Compass but it’s hard to say without knowing the course / it’s content though this is probably moving away from the original issue. I believe once you’re able to connect to both then you can proceed with it’s content so we’ll focus on that.
The original issue from what was raised in the post itself was the error regarding bad auth in compass – Can you confirm you were able to connect via compass or you’re still getting bad auth error from compass?