Created
May 17, 2014 05:20
-
-
Save paambaati/990c6050bd92836137f1 to your computer and use it in GitHub Desktop.
Add an administrator account to MongoDB instance
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
db.createUser( | |
{ | |
user: "admin_username", | |
pwd: "admin_password", | |
roles: | |
[ | |
{ | |
role: "userAdminAnyDatabase", | |
db: "admin" | |
} | |
] | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment