How to Install and Setup MongoDB on Windows 10

Nowadays we can find that the popularity of Structured Query Language(SQL) is getting decreased and the NoSQL database programs are taking place of it. Discussing with NoSQL databases, the popular one MongoDB a cross-platform document-oriented database program. MongoDB stores the data as JSON like documents other than tables in SQL. It is much easier to install MongoDB on Linux/Mac platforms using terminal commands. But Windows is mostly based Graphical User Interface(GUI)  and we need to do most of the tasks using GUI.

Download the Installation file

We can download the latest version of the MongoDB community edition from the link below. If need to choose the version/ edition/ package, MongoDB download center will help.

https://fastdl.mongodb.org/win32/mongodb-win32-x86_64-2008plus-ssl-4.0.5.zip

The link below will download a zip file. Just extract the zip file.

Paste the MongoDB folder inside C drive

Extract this zip file and paste the folder anywhere on your system. ( But Pasting this folder inside C drive will the better choice).

Create a directory to store documents

Create a folder named data inside the same path we pasted the MongoDB folder (C drive) and create a folder named db inside it. Because the MongoDB stores the database as documents inside this db folder.

The path to the “db” directory

Running MongoDB

Running MongoDB in windows is easier. First, open the MongoDB folder and to /bin. We can see a mongod.exe file inside the directory.

MongoDB folder structure

 

MongoDB running…

 

Check the MongoDB is running fine

We can check that the MongoDB is running fine on our system with a browser tab. Just enter the address below and this will show a message “It looks like you are trying to access MongoDB over HTTP on the native driver port.”

http://localhost:27017

 

MongoDB running fine

 

Accessing the MongoDB shell

We can access the MongoDB shell by opening the mongo.exe file inside the MongoDB directory.

MongoDB shell

 

Have a nice code !

About the Author: Syamlal CM

Hi, I'm Syamlal, the co-founder of Redmonark. I'm a developer, writer and also have a little bit of experience in graphic designing.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.