Processing math: 61%

Ярлыки

пятница, 9 августа 2013 г.

mongodb replicaset localhost

How I set "localhost" to replicaSet host where "rs0" is name of my replicaSet:
use local
cfg = db.system.replset.findOne({_id:"rs0"})
cfg.members[0].host="localhost:27017"
db.system.replset.update({_id:"rs0"},cfg)
then restart mongo