问题:MongoVUE连接MongoDB的过程中,如果出现以下问题:“Unable to concect to server 127.0.0.1:27017:未将对象引用设置到对象的实例”Invalid credential for database ‘admin’..”日志报错:

“Failed to authenticate root@admin with mechanism MONGODB-CR: AuthenticationFailed MONGODB-CR credentials missing in the user document”。

    出现原因:从mongoDB-2.6.x开始,mongoDB加上了认证。当mongoVUE试图连接数据库—admin时,但是,admin里的user集合中,没有用户“root”,因此,报上错。 

    解决方法:请运行mongo.exe,连上admin,新建一个用户。如果mongoDB-2.0.x,那么用该本“db.addUser(“yonghuming”, “mima”)”;如果mongoDB-3.0.3,那么请参考http://blog.csdn.net/xht555/article/details/40918951

Logo

前往低代码交流专区

更多推荐