Created
February 21, 2017 15:23
-
-
Save gilfernandes/7934c7d464e85ac0cf5d27c9737a81de to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use admin | |
db.createUser( { user: "admin", | |
pwd: "************", | |
roles: [ "userAdminAnyDatabase", | |
"dbAdminAnyDatabase", | |
"readWriteAnyDatabase" | |
] } ) | |
use dqdict | |
db.createUser( { user: "dqdict-user", | |
pwd: "****************", | |
roles: [ { role: "readAnyDatabase", db: "admin" }, | |
"readWrite"] }, | |
{ w: "majority" , wtimeout: 5000 } ) | |
use tds | |
db.createUser( { user: "tds-user", | |
pwd: "********************", | |
roles: [ { role: "readAnyDatabase", db: "admin" }, | |
"readWrite"] }, | |
{ w: "majority" , wtimeout: 5000 } ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How to create users in MongoDB for two users.