Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

mongodb create database with username and password

use mydb
db.createUser(
   {
     user: "myuser",
     pwd: "mypassword",
     roles: [ "dbOwner" ]
   }
)
 
PREVIOUS NEXT
Tagged: #mongodb #create #database #username #password
ADD COMMENT
Topic
Name
8+6 =