mongodb添加副本
时间:2022-03-15 07:37
> db.createUser({user:"admin",pwd:"zn_123456",roles:[{"role":"clusterAdmin","db":"admin"},{"role":"userAdminAnyDatabase","db":"admin"},{"role":"dbAdminAnyDatabase","db":"admin"},{"role":"root","db":"admin"}]})
Successfully added user: {
"user" : "admin",
"roles" : [
{
"role" : "clusterAdmin",
"db" : "admin"
},
{
"role" : "userAdminAnyDatabase",
"db" : "admin"
},
{
"role" : "dbAdminAnyDatabase",
"db" : "admin"
},
{
"role" : "root",
"db" : "admin"
}
]
}