Unable to connect to mongolab, Getting MongoError: auth failed

Make sure you are using the database username and password not the account username and password from Mlab.

In MLab, formerly MongoLab, do the following

  1. Navigate to Users
  2. Add Database User
  3. Choose your username and password

Now you can test this on the shell with mongo ds061374.mlab.com:61374/yourdb -u <dbuser> -p <dbpassword>

Leave a Comment