1.显示MongoDB的服务器统计:db.stats()
2.创建数据库:use dbname
3.检查当前选择的数据库:db
4.检查数据库列表:show dbs //创建的数据库dbname 列表中是不存在的。要显示的数据库,需要把它插入至少一个文件。
5.插入数据:db.movie.insert({"name":"hello world"})
来源: