Mongo脚本连接Replica-set

浏览:
字体:
发布时间:2013-12-15 22:18:46
来源:

现在已经支持直接自动连接到replica-set,并登录primary

比如:

mongo --host rs1/vm1:27017,vm3:27017,vm4:27017 db_name然后会看到一堆信息

Thu Dec 12 16:44:48.227 successfully connected to seed vm1:27017 for replica set rs1 Thu Dec 12 16:44:48.228 changing hosts to { 0: "vm1:27017", 1: "vm4:27017", 2: "vm3:27017" } from rs1/ Thu Dec 12 16:44:48.228 trying to add new host vm1:27017 to replica set rs1 Thu Dec 12 16:44:48.229 successfully connected to new host vm1:27017 in replica set rs1 Thu Dec 12 16:44:48.229 trying to add new host vm3:27017 to replica set rs1 Thu Dec 12 16:44:48.232 successfully connected to new host vm3:27017 in replica set rs1 Thu Dec 12 16:44:48.232 trying to add new host vm4:27017 to replica set rs1 Thu Dec 12 16:44:48.234 successfully connected to new host vm4:27017 in replica set rs1 Thu Dec 12 16:44:48.240 Primary for replica set rs1 changed to vm1:27017 Thu Dec 12 16:44:48.247 replica set monitor for replica set rs1 started, address is rs1/vm1:27017,vm3:27017,vm4:27017 Thu Dec 12 16:44:48.247 [ReplicaSetMonitorWatcher] starting

>更多相关文章
24小时热门资讯
24小时回复排行
资讯 | QQ | 安全 | 编程 | 数据库 | 系统 | 网络 | 考试 | 站长 | 关于东联 | 安全雇佣 | 搞笑视频大全 | 微信学院 | 视频课程 |
关于我们 | 联系我们 | 广告服务 | 免责申明 | 作品发布 | 网站地图 | 官方微博 | 技术培训
Copyright © 2007 - 2024 Vm888.Com. All Rights Reserved
粤公网安备 44060402001498号 粤ICP备19097316号 请遵循相关法律法规
');})();