1. 程式人生 > >MongoVUE連線報錯(Invalid credentials for database 'admin'.)

MongoVUE連線報錯(Invalid credentials for database 'admin'.)

MongoVUE連線報錯(Invalid credentials for database 'admin'.)

原因,詳細在這

MongoVUE版本太低了,出錯如下:

Unable to get Collection names.
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.ComNavTree.dbAddCollection_Click(Object sender, EventArgs e)


Command 'authenticate' failed: auth failed (response: { "ok" : 0.0, "errmsg" : "auth failed", "code" : 18, "codeName" : "AuthenticationFailed" })
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" : "admin", "nonce" : "2558d25c185fccc9", "key" : "4dae1dafc541b045ff891613d25a5ea4" }
Response: { "ok" : 0.0, "errmsg" : "auth failed", "code" : 18, "codeName" : "AuthenticationFailed" }

解決方案

1. D:\MongoData\config\mongod.cfg中的許可權驗證註釋了
systemLog:
    destination: file
    path: D:\MongoData\dblog\mongod.log
    logAppend: true
storage:
    journal:
        enabled: true
    dbPath: D:\MongoData\db
net:
    port: 27017

#security:
    #authorization: enabled
2. 使用NoSQL Manager for MongoDB

參見:Windows Mon