Create MongoDb User with Shell

Creating a user in MongoDB using createUser method.


db.createUser({
user: "yourusername",
pwd: "yourpassword",
roles: [{role: "readWrite", db: "Talent-Dev"}]
})

Posted by justinpham

Leave a Reply