Linux下Mongodb安装和sql语句(二)

2014-11-24 07:53:03 ? 作者: ? 浏览: 10
ce arg when slave: specify master as 当为从时,指定主的地址和端口
--only arg when slave: specify a single database to replicate 当为从时,指定需要从主复制的单一库
--pairwith arg address of server to pair with
--arbiter arg address of arbiter server 仲裁服务器,在主主中和pair中用到
--autoresync automatically resync if slave data is stale 自动同步从的数据
--oplogSize arg size limit (in MB) for op log 指定操作日志的大小
--opIdMem arg size limit (in bytes) for in memory storage of op ids指定存储操作日志的内存大小
Sharding options:
--configsvr declare this is a config db of a cluster 指定shard中的配置服务器
--shardsvr declare this is a shard db of a cluster 指定shard服务器
6. 进入数据库的CLI管理界面
cd到mongodb目录下的bin文件夹,执行命令./mongo
运行如下:
[root@namenode mongodb]# ./bin/mongo
MongoDB shell version: 1.8.2
connecting to: test www.2cto.com
> use test;
switched to db test
数据库出现如不能连上,则是一个data目录下的mongod.lock文件的问题,可以用如下的修复的命令,
mongod --repair

http://www.2cto.com/database/201204/127329. html

作者 sai9924
-->

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: