1.開啓mongod服務mongodb
2.鏈接mongodb客戶端,./mongo --host 192.168.80.128 --port 27017數據庫
3.建立數據庫:use testdb1工具
4.建立表:db.createCollection("testTable1")cdn
5.執行JS腳本插入數據:for(var i=0;i<100;i++) db.testTable1.insert({name:"Joe",age:20,index:i})blog
6.查詢插入的數據:db.testTable1.find()it
這個工具很簡單,有相應的提示,在灰色框中輸入 命令執行便可。io