mongodb权限

1.在无密码模式下添加账号

db.createUser(
  {
        user: "user",
        pwd: "pwd",
        roles: [ { role: "readWrite", db: "test1" },{ role: "readWrite", db: "test2" } ]
  }
)                

2.角色权限说明

http://www.2cto.com/database/201507/420854.html

原文地址:https://www.cnblogs.com/guochunyi/p/5253003.html