How do I start Mongo DB from Windows?
Step 1
Download the mongodb
Step 2
- Follow normal setup instructions
Step 3
- Create the following folder
C:\data\db
Step 4
cd
toC:\Program Files\MongoDB\Server\3.2\bin>
- enter command
mongod
- by default, mongodb server will start at port
27017
Step 5
- (optionally) download RoboMongo and follow normal setup instructions
Step 6
- Start RoboMongo and create a new connection on
localhost:27017
Your MongoDB is started and connected with RoboMongo (now Robo 3T) - a third party GUI tool
- Download from http://www.mongodb.org/downloads
- Install .msi file in folder C:\mongodb
- Create data, data\db, log directories and mongo.config file under C:\mongodb.
Add the following lines in "mongo.config" file
port=27017dbpath=C:\mongodb\data\db\logpath=C:\mongodb\log\mongo.log
Start server :
mongod.exe --config="C:\mongodb\mongo.config"
Connect to localhost MongoDB server via command line
mongo --port 27017
Connect to remote MongoDB server via command line with authentication.
mongo --username abcd --password abc123 --host server_ip_or_dns --port 27017
That's it !!!