mongodb readwrite to all dbs code example
Example: mongodb readwrite to all dbs
use admin
db.createUser({
user: '',
pwd: passwordPrompt(), // or ''
roles: [ "userAdminAnyDatabase", "readWriteAnyDatabase" ]
})
use admin
db.createUser({
user: '',
pwd: passwordPrompt(), // or ''
roles: [ "userAdminAnyDatabase", "readWriteAnyDatabase" ]
})