Mongodb副本集搭建经验

一、环境配置经验

1.一般安装的副本集的时候,主实例可以有数据库和用户;从实例不能、仲裁机不能有任何数据库包括用户

2.搭建副本集的时候Host使用外网IP,否则使用Mongodb VUE 1.6.9连接副本集异常

3. 如果需要登录从实例查看数据库信息,则需要执行db.getMongo().setSlaveOk();

二、遇到的问题

1. Unable to connect to a member of the replica set matching the read preference SecondaryPreferred

2.Server instance  is no longer connected.

解方方案

1.更换语言对应的新驱动,如果C# 1.10

2.更换更高的数据库版本,3.0.7

 

posted @ 2015-12-07 14:53  b̶i̶n̶g̶.̶  阅读(365)  评论(0编辑  收藏  举报