mongo db 3.6 roles code example
Example: mongodb readwrite to all dbs
use admin
db.createUser({
user: '<some username>',
pwd: passwordPrompt(), // or '<your password>'
roles: [ "userAdminAnyDatabase", "readWriteAnyDatabase" ]
})
use admin
db.createUser({
user: '<some username>',
pwd: passwordPrompt(), // or '<your password>'
roles: [ "userAdminAnyDatabase", "readWriteAnyDatabase" ]
})