新版本Mongo4.0 新建用户

db.createUser( 
{ 
user: “admin”, 
pwd: “xxx”, 
roles: [ { role: “userAdminAnyDatabase”, db: “admin” } ], 
mechanisms : [“SCRAM-SHA-1”] 
}

 

posted @ 2019-07-03 10:43  cnkker.com  阅读(370)  评论(0编辑  收藏  举报