I have a very simple Mlab account and I'm trying to connect via command line with this command:
mongo server_name.mlab.com:port/inventory -u <dbuser> -p <dbpassword>
but I keep running into this problem:
2016-05-26T15:41:18.195+0200 Error: 18 { ok: 0.0, errmsg: "auth failed", code: 18 } at src/mongo/shell/db.js:1210 exception: login failed
How do I get rid of this and how can I connect to mlab easily?
These are some of the solutions: Ensure that your MongoDB instance is running: Compass must connect to a running MongoDB instance. Also check you have installed MongoDB and have a running mongod process. You should also check that the port where MongoDB is running matches the port you provide in the compass connect.
I think that you're using your mLab
credentials. You must set a DB User at the User Tab like this:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With