db.createUser({user: "admin",pwd: "xxx",roles: ["root"]});
来源: http://www.bubuko.com/infodetail-3336390.html