How do I start Mongo DB from Windows? How do I start Mongo DB from Windows? mongodb mongodb

How do I start Mongo DB from Windows?


Step 1

Download the mongodb

Step 2

  • Follow normal setup instructions

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

Step 3

  • Create the following folder

C:\data\db

Step 4

  • cd to C:\Program Files\MongoDB\Server\3.2\bin>
  • enter command mongod
  • by default, mongodb server will start at port 27017

enter image description here

Step 5

  • (optionally) download RoboMongo and follow normal setup instructions

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

Step 6

  • Start RoboMongo and create a new connection on localhost:27017

enter image description here

Your MongoDB is started and connected with RoboMongo (now Robo 3T) - a third party GUI tool


This worked for me

mongod --port 27017 --dbpath C:\MongoDB\data\db


  1. Download from http://www.mongodb.org/downloads
  2. Install .msi file in folder C:\mongodb
  3. Create data, data\db, log directories and mongo.config file under C:\mongodb.
  4. Add the following lines in "mongo.config" file

    port=27017dbpath=C:\mongodb\data\db\logpath=C:\mongodb\log\mongo.log
  5. Start server :

    mongod.exe --config="C:\mongodb\mongo.config"
  6. Connect to localhost MongoDB server via command line

    mongo --port 27017
  7. 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 !!!