Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

mongodb add user

use <your database>
db.createUser({
  user: '<some username>',
  pwd: passwordPrompt(),
  roles: [{
    role: 'readWrite',
    db: '<your database>'
  }]
})
Source by dba.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #mongodb #add #user
ADD COMMENT
Topic
Name
4+2 =