码迷,mamicode.com
首页 > 数据库 > 详细

mongodb添加副本

时间:2018-04-17 17:59:35      阅读:71      评论:0      收藏:0      [点我收藏+]

标签:create   min   cluster   副本   database   mongo   user   nan   roo   

> 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添加副本

标签:create   min   cluster   副本   database   mongo   user   nan   roo   

原文地址:https://www.cnblogs.com/imaye/p/8868116.html

(0)
(0)
   
举报
评论 一句话评论(0
0条  
登录后才能评论!
© 2014 mamicode.com 版权所有 京ICP备13008772号-2
迷上了代码!