init_mongo.js 283 B

12345678
  1. // run this script with $ mongo < init_mongo.js
  2. if ( ! db.getUser("tester") ) {
  3. db.createUser({user: "tester", pwd: "12345678",
  4. roles: [{role: "dbAdmin", db: "pwmantest"},
  5. {role: "readWrite", db: "pwmantest"},]
  6. })
  7. }