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

posted @ 2016-03-08 10:17  無限大  阅读(151)  评论(0编辑  收藏  举报