I am running a mongodb 2.4 with auth enabled and want to upgrade to 2.6
Instructions in upgrade 2.6 says:
Before beginning the upgrade process for a deployment that uses authentication and authorization:
- Ensure that at least one user exists in the admin database with the role userAdminAnyDatabase.
- then upgrade binaries
- then run athorization schema format if needed
So I have to add user with the role userAdminAnyDatabase in 2.4 before copies binaries of 2.6 ?
in current 2.4 shell added user with role userAdminAnyDatabase and then schema upgrade with userAdminAnyDatabase role after coping binaries of 2.6
db.addUser( { user: "a", pwd: "pass", roles: [ "userAdminAnyDatabase" ] } )
Is this the right way? Do i need to add read write access as well?
I think i might not get the error below if I go into admin database with role userAdminAnyDatabase
> show collections
2016-02-22T18:51:10.765-0500 error: {
"$err" : "not authorized for query on oasis.system.namespaces",
"code" : 13
} at src/mongo/shell/query.js:131