Mongo常用操作 设置登陆验证 进入Mongo添加用户 db.addUser('root','123456') 编辑Mongo配置文件 vi /etc/mongod.conf 找到#auth = true 把“#”去掉 保存 重启mongo