输入banner图图片脚本导航/分类

mongodb创建超级用户和普通用户(对应数据库的用户)

"test1", pwd: "test1", roles: [{role: "root", db: "admin"}]})

 技术图片

 

 

 

2、创建test2db对应的test2用户:

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

也可以利用studio创建

技术图片

 

 


mongodb创建超级用户和普通用户(对应数据库的用户)

标签:pre   nbsp   mongod   管理员   mongodb   read   image   技术   studio