
In this web guide you will learn how to install mongodb (Mongo Database) on Window 10, 8 and 7. Mongo DB is basically a database in which we store data in a very large amount. It is totally different if we compare mongo db with MySQL. Mongo Database is basically used in websites in which data quantity is very high and needs speed for serving data. Let’s start installing Mongo DB on Windows 10, 8 and 7.
Steps to Install Mongo Database on Windows 10, 8 and 7
1. First download latest version of Mongo DB from their official website . When you open you will see many options for downloading. Just choose community server and select your operating system.
2. After download setup file right click on it and run as administrator. A window will open like below

3. Check Terms and conditions of Mongo DB and when you click next second window will open like below

4. You can see two options one is complete installation and second is custom. To make it easy we will choose custom option so we can install it in root directory of your windows. When you click custom a window will open like below :-

5. You can see browse button on right side of Location. Change Location from
C:\Program Files\MongoDB\Server\3.4\

to
C:\mongodb


Then click on next button for proceeding the installation. Another window will open like below ..

Click on Install and wait till the installation is completed.
6. After installation open directory where you have install mongodb library that is C:\mongodb then open bin folder in it.

7. Copy the path C:\mongodb\bin then click on start menu and search for advance system settings and open it

8. A new window will open that will show advance system settings for your operating system. Click on Environment Variables for adding mongo DB Path for global access.

9. A new window will open like below

10. Click on Edit button as mention above screenshot then a window will open that allow you to add path

Paste your mongodb path in variable value as show above and click ok as shown in above screenshot.
10. Mongo DB Windows Installation is completed
Why we set environment variables for mongo db ?
For running mongo db you have to open installation folder and then open command prompt to run windows. But if you have set environment variable for mongo db then you don’t need to go installation folder just simple open cmd anywhere and run Mongo DB.
How to run MongoDB after setting environment variables ?
Just simply open command prompt by searching it on start menu or if you know shortcuts then go for it.


Now run command “mongod” like below
Hit Enter some processing will start and ends like below

mongod command will activate mongodb default port that is 27017 but it does not start mongodb. For starting mongodb just minimize current command prompt window and open another command prompt window.
When you open new command prompt window type mongo as shown below

And hit enter to start mongo db.

That’s it, you can see warnings just ignore it your mongo db is working fine. Warnings are due to anonymous starting mongo db . You can authenticate using username and password then these warnings will not show. We will discuss it in next tutorial.
How to check Mongo DB is running in Windows ?
For checking mongo db is working or not just open any browser and type address http://localhost:27017 you will see below screenshot

If your mongo db not working then this link will not work. Be sure that both command prompt windows are open while using mongo db.
Category : Web Development