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.



1. Download the Installation File

We can download the latest version of the MongoDB community edition from the link below.

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

Note:-

With the above link, we can download the MongoDB 4.0.5 version. The latest version of MongoDB can be downloaded from the official website URL below.

https://www.mongodb.com/download-center/community

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

2. 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).

3. 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.

Path to the “db” directory

4. 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…

5. 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

6. 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 !

Be the first to reply

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.