Recently installed mongodb3.1.4, and enabled authorization authentication, in DOS window operation without any problems, in order to maintain the convenience of downloading a client tool Robomongo 0.8.5, user name, password, such as configuration good solution test, the result of connection service is not a problem, permission verification did not pass , as shown in the log, found a sentence: Failed to authenticate admin@admin with mechanism mongodb-cr:authenticationfailed MONGODB-CR credentials Missing in the user document tried all kinds of ways, Baidu Search all over no one can solve, no way can only ask Google, finally in a foreign site found original or MongoDB database version problem, query version to solve the idea: in the state of non-authorization authentication first, Delete the existing user and, secondly, modify the CurrentVersion of the version table, after the function re-create the user operation step: 1, delete the User: Db.dropuser ("admin"); 2, Modify Version:db.system.version.update ({"_id": "Authschema"},{$set: {"CurrentVersion": 3}}); 3. Re-create the user:
Db.createuser ({User: "admin", pwd: "admin", roles:[{"role": "Useradminanydatabase", "db": "admin"},{"role": "ReadWrite "," DB ":" Test "}]}) 4, restart the MONGDB service, test again, finish the work.