无法连接到MongoLab,“身份验证失败";错误 [英] Unable to connect to MongoLab "auth fails" error

查看:64
本文介绍了无法连接到MongoLab,“身份验证失败";错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是mongo的新手.最近在mongoLab中创建了一个帐户.

I am new to mongo. Recently created an account in mongoLab.

我正在尝试使用以下语句连接到数据库.

I am trying to connect to the database using the below statement.

mongo ds039487.mongolab.com:39487/webbies -u <dbuser> -p <dbpassword>

出现以下错误

MongoDB shell version: 2.4.8
connecting to: ds039487.mongolab.com:39487/webbies
Wed Dec 11 22:30:16.686 Error: 18 { code: 18, ok: 0.0, errmsg: "auth fails" } at src/mongo/shell/db.js:228
exception: login failed

注意: dbuser-是在mongoLab中创建的用户

Note: dbuser - is an User created in mongoLab

这缺少什么?请指教.

推荐答案

感谢pneumee.

问题是因为我使用的是mongolab.com用户名和密码,而不是数据库的用户名和密码.

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

现在正在工作.

这篇关于无法连接到MongoLab,“身份验证失败";错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆