db.createUser({ user:"root", pwd: "zaixiu!@#$%^", roles:[{role:"userAdminAnyDatabase",db: "admin"}]}); db.auth("root","zaixiu!@#$%^"); use addressbook db.createUser({user:"root",pwd:"zaixiu!@#$%^",roles:[{role:"read", db:"addressbook"},{role:"readWrite", db:"a...
db.createUser({ user:"root", pwd: "zaixiu!@#$%^", roles:[{role:"userAdminAnyDatabase",db: "admin"}]}); db.auth("root","zaixiu!@#$%^"); use addressbook db.createUser({user:"root",pwd:"zaixiu!@#$%^",roles:[{role:"read", db:"addressbook"},{role:"readWrite", db:"a...