Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

mongodb create admin user for all databases

use admin
db.createUser({ user: "mongoadmin" , pwd: "mongoadmin", roles: ["userAdminAnyDatabase", "dbAdminAnyDatabase", "readWriteAnyDatabase"]})
Source by dba.stackexchange.com #
 
PREVIOUS NEXT
Tagged: #mongodb #create #admin #user #databases
ADD COMMENT
Topic
Name
7+4 =