启动:
mongod
管理:
mongo
添加新用户(3.0版本)
db.createUser( { user: "accountUser", pwd: "password", roles: [ "readWrite", "dbAdmin" ] } )
关闭
ctrl + c 或者:
mongo
use admin
db.shutdownServer()
安装方法:https://docs.mongodb.org/manual/tutorial/install-mongodb-on-os-x/
原文:http://www.cnblogs.com/otss/p/5097485.html