# MongoDB Up and Going
https://ide.c9.io/xgqfrms/mongodb
# MongoDB 教程
https://www.runoob.com/mongodb/mongodb-tutorial.html
```sh
# start
# server
$ mongod --dbpath /System/Volumes/Data/data/db
# stop
$ mongod --shutdown
# Ctrl + C
# kill <mongod process ID>
# Shut down the mongod from the mongo shell using the db.shutdownServer() method as follows:
> use admin
> db.shutdownServer()
```
https://docs.mongodb.com/manual/tutorial/manage-mongodb-processes/#stop-mongod-processes
```sh
# client
$ mongo
# 查看所有数据库
> show databases;
> show dbs;
> show dbs
# 数据库不存在,则创建数据库,否则切换到指定数据库
> use test
> db.test.insert({"name":"xgqfrms"})
# 创建集合,类似SQL数据库中的表
> db.createCollection("table")
# 查看集合
> show collections
> show tables
# 删除集合
> db.collection.drop()
# 删除当前数据库
> db.dropDatabase()
```
https://zzk.cnblogs.com/my/s/blogpost-p?Keywords=MongoDB