Unable to connect to MongoLab “auth fails” error

徘徊边缘 提交于 2019-12-03 01:20:37

Old thread, but just in case it helps anyone else: my problem was using shell version 2.4.9 to connect to mongo db version 3.0.7 (http://docs.mongolab.com/connecting/#mongo_shell).

Updating my shell sorted it (https://docs.mongodb.org/master/tutorial/install-mongodb-on-ubuntu/).

Thanks to pneumee.

The issue was because I was using my mongolab.com username and password, instead of the database username and password.

It is working now.

OK - I figured it out and would also like to add onto pneumee's answer.

  1. Go to mongolab.com
  2. Login.
  3. Navigate to the "Users" tab.
  4. If you have forgotten your Username and Password for the database, I suggest you "Add a new user" and supply it with the username and password.

default users in db

login: admin 
password: admin

check users in https://mongolab.com/databases/MYDBNAME#users

my problem was being putting login and password mongolab

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!