kevinlinxp
12/31/2016 - 6:48 AM

DB:MongoDB:Basics

DB:MongoDB:Basics

db = db.getSiblingDB('waterme');
db.createUser({
  user: "waterMongo",
	pwd: "wEnefu6A",
	// customData: { <any information> },
	roles: []
});
mongo -u "<username>" -p "<pwd>" --authenticationDatabase "<db>"