1.mongo //找到mongodb

2.show dbs //展示数据库

3.use xx //进入xx库,没有则创建

4.show collections //查看数据库中的表(文档)

5.db.文档名.find({"_id":ObjectId(“5fc237a78d60174dffc0cb7f”)}) //查询id为5fc237a78d60174dffc0cb7f的记录

6.db.文档名.find({“email”:“123.com”}).pretty() //pretty()函数换行显示

7.数组查询,查询数组中包含某个元素
db.xxx.find({tags:“xxxxx”})
