Trying to access deployed Meteor website MongoDB Database, getting exception: login failed

Forgive my noob question but I am new to Meteor development.

I am trying to access my deployed website’s MongoDB collections, but I can’t seem to log in.

I’ve logged in using:

$ meteor login
$ Username: my_meteor_user_name
$ Password: my_meteor_password 
Logged in as my_username. Thanks for being a Meteor developer!

Then, I try to access meteor mongo using:

$ meteor mongo
MongoDB shell version: 2.6.7
connecting to:
2016-01-15T17:47:34.224-0800 Error: 18 { ok: 0.0, errmsg: "auth failed", code: 18 } at src/mongo/shell/db.js:1210
exception: login failed

I keep getting this “login failed” message and can’t figure out exactly how I should proceed. I’ve tried this workaround that’s posted here in the Meteor forums but I get the same error message.

I’ve also tried:
$ mongo -u my_meteor_user_name -p my_meteor_password
and got a connect failed message. It’s almost like no matter what I do, it doesn’t recognize my user name and password. In fact, I don’t even remember setting a password for mongoDB, I’ve only had a Meteor password.

As of now, I’m only able to access my deployed MongoDB collection via the console on my browser inspector, which is obviously not the way I should be doing this. Any help would be appreciated.

Have you tried the workaround shown here:

It says you should run

meteor mongo --url

Note the --url at the end - this is just supposed to print out the URL of the Mongo database, so that you can access it with your other Mongo client.

thanks @sashko. Yes, I have tried the workaround command, but it gives me the same error. Would you be able to recommend a mongo client that I can use to access my Meteor deployed Mongo database? I haven’t used one before.

Can you paste the command you ran and what the exact error was? I don’t think it’s possible to get the same error when running with the url option.

Hi @sashko. Actually I figured it out. The workaround command here (`meteor mongo` giving "exception: login failed" - workaround) does work. I just had to reinstall MongoDB to a 3.x version for it to work. (I originally had MongoDB version 2.6? installed).
Thanks for your help.