前提:
1.mongodb是运行状态
2.进入MongoDB\bin\ 运行mongo.exe
#查看所有数据库
show dbs
#切换到admin数据库
use admin
#查看某个库下所有集合(相当于表)
show collections
#查看某个数据库下MsgType集合所有数据(相当于表)
db.MsgType.find()
#删除集合中某条数据
db.MsgType.remove({'_id':ObjectId('4f29e4860b2e2ecb9910e304')})
db.user.remove({"_id":"1"})
#插入一条数据
db.user.insert({"_id":"1"})