2018年4月24日 星期二

MongoDB fast tutorial for windows



1. Download Mongodb
2. During installation, uncheck : install MongoDB Compass  因為會卡住
3. Set Path eg:  C:\mongodb\bin\    Then you can execute   mongo.exe and mongod.exe
4. Set up a MongoDB data folder.  eg: C:\mongodata\
5. In the cmd, execute: mongod --dbpath C:\mongodata\    啟動mongodb  這樣畫面不關就是啟動
6. New a batch file: execute : mongo 127.0.0.1:27017/admin  用管理員權限登入 mongoDB
7. Execute this batch. you can get in mongodb

可以在batch檔加入:
mongod --dbpath C:\mongodata\      啟動資料庫與指定位置
mongo 127.0.0.1:27017/admin        進入互動介面

沒有留言:

張貼留言