mongodb创建管理员用户

db.createUser({user: "admin",pwd: "xxx",roles: ["root"]});
原文地址:https://www.cnblogs.com/gaobing/p/12056312.html