mongodb集群主从节点转移

来源:互联网 发布:好用的windows笔记本 编辑:程序博客网 时间:2024/06/05 18:54
conf = rs.conf(){    "_id" : "rs0",    "version" : 2,    "members" : [        {            "_id" : 0,            "host" : "YX-ARCH:27011"        },        {            "_id" : 1,            "host" : "YX-ARCH:27012"        }    ]}
rs0:PRIMARY> conf.members[1].priority = 22rs0:PRIMARY> rs.reconfig(conf)Fri Jan 24 15:25:36.069 DBClientCursor::init call() failedFri Jan 24 15:25:36.070 trying reconnect to localhost:27011Fri Jan 24 15:25:36.070 reconnect localhost:27011 okreconnected to server after rs command (which is normal)rs0:SECONDARY>


0 0
原创粉丝点击