# 启动与关闭
* * * * *
--: 作者:Mick
时间:2018年10月9日
* * * * *
### 启动服务
./mongod -f /etc/mongod.conf
mongod 表示mongodb的服务器命令
-f /etc/mongod.conf 表示配置文件
./mongod -h 查看更多参数
### 连接服务
./mongo --host 127.0.0.1 --port 27717 -u root -p 123456 --authenticationDatabase admin
mongo 表示mongodb的客户端命令
--host 主机地址(注意是不是远程连接,因为配置文件有限制,本地连接可省略
--port 27717 mongodb服务器的端口号,默认27017端口号keshenglue
-u root 账号
-p 123456 密码
--authenticationDatabase admin 上面账号密码对应的认证库
./mongo -h 查看更多参数