且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

无法连接到mongolab,出现MongoError:验证失败

更新时间:2023-12-04 23:12:22

请确保您使用的是数据库usernamepassword而不是Mlab的帐户usernamepassword.

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

在MLab(以前为MongoLab)中,执行以下操作

In MLab, formerly MongoLab, do the following

  1. 导航到Users
  2. Add Database User
  3. 选择您的用户名和密码
  1. Navigate to Users
  2. Add Database User
  3. Choose your username and password

现在,您可以使用以下命令在Shell上进行测试 mongo ds061374.mlab.com:61374/yourdb -u <dbuser> -p <dbpassword>

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