installing mongodb on windows

The following two tabs change content below.
Prasad Kharkar is a java enthusiast and always keen to explore and learn java technologies. He is SCJP,OCPWCD, OCEJPAD and aspires to be java architect.

Latest posts by Prasad Kharkar (see all)

Previously we have seen a little bit introduction about mongodb and documents. We can start doing some practical stuff with mongodb. In this article, we will see about installing mongodb on windows and run it.

Installing mongoDB on windows:

  • Download the latest mongoDB version from official downloads page.
  • You will see a file with name something like mongodb-win-32-x86_64-x.x.x.zip where x.x.x. denotes version number.
  • Place it under any desired directory where you want your installation.
  • After extraction, navigate to folder mongodb-win-32-x86_64-x.x.x , where you will find bin directory under which you can see all mongodb tools like mongod, mongo, mongodump, mongorestore. 
  • Under  mongodb-win-32-x86_64-x.x.x itself, create a folder called data.
  • Under data, create folder called db. This is used to store mongodb databases.

That’t is we are done installing mongoDB installation on windows. We can start it up using mongod. 

Navigate to bin and open command prompt there and run command mongod –dbpath ../data/db. This should start mongodb and you will see following log

This means installing mongodb on windows is succesful and it is able to start. Now we can connect to it u

sing the mongo client

Open another command prompt and type mongo, you’ll see we’ve connected to mongoDB

I hope this article helped in installing mongodb on windows and starting it. Further we will go with CRUD operations.

Share Button

Prasad Kharkar

Prasad Kharkar is a java enthusiast and always keen to explore and learn java technologies. He is SCJP,OCPWCD, OCEJPAD and aspires to be java architect.

3 thoughts on “installing mongodb on windows

Leave a Reply

Your email address will not be published. Required fields are marked *