mongoDB VUE问题

1. mongoDB VUE问题
但是不能打开数据库,出现异常:

 

[mongo@localhost data]$ wc -l socialRelation.json
73224 socialRelation.json

 

Invalid credentials for database 'admin'.

Type: MongoDB.Driver.MongoAuthenticationException

Stack:    MongoDB.Driver.Internal.MongoConnection.Authenticate(String databaseName, MongoCredentials credentials)

   MongoDB.Driver.Internal.MongoConnection.CheckAuthentication(MongoDatabase database)

   MongoDB.Driver.MongoServerInstance.AcquireConnection(MongoDatabase database)

   MongoDB.Driver.MongoServer.AcquireConnection(MongoDatabase database, Boolean slaveOk)

   MongoDB.Driver.MongoCursorEnumerator`1.AcquireConnection()

   MongoDB.Driver.MongoCursorEnumerator`1.GetFirst()

   MongoDB.Driver.MongoCursorEnumerator`1.MoveNext()

   MongoDB.Driver.MongoDatabase.GetCollectionNames()

   MangoUI.MCollections.GetAll(String db)

   MangoUI.MCollections.Get(String db)

   MangoUI.ComNavTree.nuedayAQwLobI9qiNSO(Object , Object )

   MangoUI.ComNavTree.ExpandMe(MTreeNode expand)

   MangoUI.ComNavTree.tree_BeforeExpand(Object sender, TreeViewCancelEventArgs e)

 

Command 'authenticate' failed: auth failed (response: { "ok" : 0.0, "errmsg" : "auth failed", "code" : 18 })

Type: MongoDB.Driver.MongoCommandException

Stack:    MongoDB.Driver.Internal.MongoConnection.RunCommand(String collectionName, QueryFlags queryFlags, CommandDocument command)

   MongoDB.Driver.Internal.MongoConnection.Authenticate(String databaseName, MongoCredentials credentials)

Inputs::

Command:  authenticate

Ok:       False

ErrorMsg: auth failed

Request:  { "authenticate" : 1, "user" : "root", "nonce" : "648317e89c43ccfc", "key" : "41883f43c1a02de50cd0611a6bca0603" }

Response: { "ok" : 0.0, "errmsg" : "auth failed", "code" : 18 }

 

解答:

权限认证问题。mongo默认的启动方式是没有权限认证的,就是不需要用户名密码,但是如果你启动mongo服务的时候加上了-auth,则必须使用正确的用户名和密码才能登陆。

 

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29050044/viewspace-2127452/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/29050044/viewspace-2127452/

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值