【MongoDB学习笔记31】MongoDB配置副本集
# mongoMongoDB shell version: 2.6.6
connecting to: test
> db=(new Mongo("192.168.1.113:27017")).getDB("test")
test
> config={"_id":"spock",
... "members":[
... {"_id":0,"host":"192.168.1.112:27017"},
... {"_id":1,"host":"192.168.1.113:27017"}]}
{
"_id" : "spock",
"members" : [
{
"_id" : 0,
"host" : "192.168.1.112:27017"
},
{
"_id" : 1,
"host" : "192.168.1.113:27017"
}
]
}
页:
[1]