MongoDB 數據庫 ---圖片來源網絡 整理 概括
全局開啓服務器存儲地址 mongod --dbpath d:\data\db
全局開啓服務器mongo
單個開啓相關頁面的js node XX
使用某一個數據庫
1 查看數據庫 show dbs
2 切換/建立數據庫 use 數據庫的名字 沒有會自動建立
3 使用該數據庫 db.getName
4 查看該數據庫下的文件集合 db.getCollectionNames()
5 查看進入該數據庫下的某一文件 db.XX.find()
![](http://static.javashuo.com/static/loading.gif)
![](http://static.javashuo.com/static/loading.gif)
![](http://static.javashuo.com/static/loading.gif)
![](http://static.javashuo.com/static/loading.gif)
![](http://static.javashuo.com/static/loading.gif)
![](http://static.javashuo.com/static/loading.gif)
-------------------整理於yingxiang 20190218