首页 > 数据库技术 > 详细

Authorization Security for Mongodb

时间:2017-06-01 14:30:31      阅读:348      评论:0      收藏:0      [点我收藏+]

To keep security for the mongodb server, we can create an authorized machanism.

 

db.createUser(
    {
        user: "user1",
        pwd: "passwd",
        roles:[{"role": "userAdminAnyDatabase", "db": "admin"}]

    }
)

db.createUser(
    {
        user: "user2",
        pwd: "passwd",
        roles:[{"role": "readWrite", "db": "database"}]

    }
)

 

Authorization Security for Mongodb

原文:http://www.cnblogs.com/zhuangzebo/p/6928466.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!