Created
August 1, 2023 12:33
-
-
Save Maurifc/e4fc34e01dd517c1c448f618684541d5 to your computer and use it in GitHub Desktop.
Commands to create a MongoDB user
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
// Change database | |
use mydb | |
// Create user | |
db.createUser( | |
{ | |
user: "john", | |
pwd: "123567", | |
roles:["readWrite"] | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment