How to install and Configure MongoDB for Windows

Facebooktwittergoogle_plusredditpinterestlinkedinmail

This is a complete step by step guide to install MongoDB on Windows.

install MongoDB on Windows

Step 1: Go to MongoDB download Page and click download as shown in the screenshot. A .msi file like this mongodb-win32-x86_64-2008plus-ssl-3.4.7-signed will be downloaded in your system.

Double click on the file to run the installer.

Step 1 : Create a directory C:\data\
MongoDB Website Download Page

Step 2: Click Next when the MongoDB installation windows pops up.
MongoDB installation window

Step 3: Accept the MongoDB user Agreement and click Next.
Accept the MongoDB user Agreement

Step 4: When the setup asks you to choose the Setup type, choose Complete.
Choose Complete installation

Step 5: Click Install to begin the installation.
Click Install

Step 6: That’s it. Click Finish once the MongoDB installation is complete.

We are not done here. There are couple of steps we need to do before we can start using MongoDB.

MongoDB Configuration

Step 1: Locate the folder where you have installed MongoDB. for the example you have created a directory like c:\data\ and installed here.

C:\data\

Step 2: Set Environment Variable( Add a system variable)

Step 3: Open Command Prompt and Type this command and go in bin directory

c:\cd data 
c:\dada\cd data

Step 4: Type this command and start the mongoDB server

c:\data\bin\mongod

Step 5: Open Second Command Prompt and go to bin director Typing this command.

c:\cd data 
c:\data\cd bin

Step 6: start mongo Typing this command.

c:\data\bin\mongo

Step 7: Check Database, create database, check collection(MySQL we know table).

> show dbs
> use dadmin
> show collections

We wish you all the best and appreciate your time. If you liked the blog, then please don’t mind sharing them.

2 comments on “How to install and Configure MongoDB for Windows”

  1. traits says:

    Stunnіng quest there. What occurred after? Take care!

  2. Hey there! I know this is kinda off topic but I was wondering if you
    knew where I could get a captcha plugin for my comment form?
    I’m using the same blog platform as yours and I’m having difficulty finding one?
    Thanks a lot!

Leave a Reply

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

  • twitter
  • facebook
  • instagram
  • linkedin