Show dbs; coming back empty [ ] Connected okay

Hello,

I have everything setup in MongoDB and can connect fine using the connection string:

mongodb+srv://m001-student:m001-student-pass@sandbox.XXXXXX.mongodb.net/admin

however when I run the show dbs; command I get back blank result [ ]

Can anyone help?

thanks

chris

this is means you are not authorized to database.

try this if it authorizes
db.getSiblingDB("$external").auth({ mechanism: “PLAIN”,user: “username”, pwd: “password”} );

Thanks Murali,

I figured out that the error was the “admin” at the end of my connection string. When I tried it with .“myFirstDatabse” it worked fine.

thanks for your help tho!

1 Like

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