杨叔叔 发表于 2018-10-27 06:38:43

mongodb之master/slave模式

# mongo 192.168.58.10  
MongoDB shell version: 2.4.6
  
connecting to: 192.168.58.10/test
  
> show dbs;
  
admin0.203125GB
  
local10.0732421875GB
  
nick0.203125GB
  
test0.203125GB
  
zhuima0.203125GB
  
> use nick
  
switched to db nick
  
> use newdb
  
switched to db newdb
  
> db.newdb.insert({new:"yes",info:"nothing"})
  
> show collections
  
newdb
  
system.indexes
  
> db.newdb.find()
  
{ "_id" : ObjectId("53cbd4b35974b01658718b2d"), "new" : "yes", "info" : "nothing" }
  
>


页: [1]
查看完整版本: mongodb之master/slave模式