mongodb添加副本
Posted 二十五
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mongodb添加副本相关的知识,希望对你有一定的参考价值。
> 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"
}
]
}
以上是关于mongodb添加副本的主要内容,如果未能解决你的问题,请参考以下文章