badge badge

How to Install MongoDB on Windows [Step by Step Guide]

To install MongoDB on Windows, first, you will have to download the installation file from the official MongoDB website.

You should download the correct file for your operating system like 32 bit or 64 bit. If you are not sure about it, just use the below command to check your OS version.

Check OS Version

Depending on your OS version, select the download package from the drop down and download the MongoDB installation file which will be about 100 MB.

By default, it will be downloaded in the “downloads” folder on your system.

Install MongoDB on Windows

Locate the downloaded MSI file and simply double click it. You will have to follow few step to install it easily.

MongoDB Installation on Windows

Once you will complete the installation, you will have to do some basic setup to configure MongoDB.

MongoDB requires a data folder to store its files. The default location for the MongoDB data directory is c:\data\db. So you need to create this folder using the Command Prompt. Just create the below folder using the commands shown below-

Create Directory for MongoDB

Now you will have to start the services to run MongoDB.

Once you will install MongoDB on Windows, you will find some files extracted and stored in the below folder of your system.

MongoDB Installation on WIndows

Folder: C:\Program Files\MongoDB\Server\3.2\bin

You will need the highlighted two files mongo.exe and mongod.exe to start the MongoDB on windows.

Start MongoDB

To start MongoDB, you will have to execute the following command.

Start MongoDB

Here the system will ask you about the connection. Here do not make mongod.exe visible on public networks without running in “Secure Mode” with the auth setting. MongoDB is designed to be run in trusted environments, and the database does not enable “Secure Mode” by default.

So select the Home/Private mode for the connection here.

Note: Here you will be getting the last line something like “waiting for connections on port 27017”. Ignore that. Just open another command prompt and start with the next step.

Connect to MongoDB

To connect MongoDB through Mongo.exe, open another command prompt and execute the below command-

Connect to MongoDB

With this, you have installed MongoDB successfully on your windows system!

DB Help in MongoDB

If you any help related to MongoDB just type db.help() in the command prompt and it will show you all the available commands.

Command: db.help()

MongoDB Help Command

Now you can simply do the operation you want to perform. No need to go to any shell.

For example, we want to create a database named “hdfstutorial”. Just use the below command and your database will be created.

Command: use hdfstutorial

Create Database in MongoDB

Conclusion
This was all about how to install MongoDB on Windows. I hope you got the exact steps to install MongoDB on Windows operating system.

Do try and let me know if you will face any issue. The same method is used to install MongoDB on windows 10 or any other windows OS.

20 Comments

  1. Nitinchabra@yahoo.com' Nitin Chabra
  2. BehringHeacox483@hotmail.com' Behring Heacox
  3. mflgnchss@gmail.com' Markus Gupital
  4. dfhcmf@gmail.com' Samir Raina
  5. baphjkbmqa@gmail.com' Iliya Mackinsey
  6. douwesht@gmail.com' Douet Whist
  7. nkgofsw@gmail.com' Sabram Sinha
  8. zsachrklfrd@gmail.com' Priya Sangwan
  9. lhosbpcn@gmail.com' Aging Elderly
  10. ceejkkmsb@gmail.com' Ali Mirza
  11. vvhumiqtv@gmail.com' Versa Shukla
  12. ibzmbfw@gmail.com' Ankur
  13. ozonuram@w.eamale.com' Zen Franskan
  14. uanuhul@emailer.printemailtext.com' Rahul Trivedi
  15. ukfata@emailer.printemailtext.com' Iyer Ustab
  16. eve.constance@inbox.com' Manual Hzjiwk
  17. kyuxpog@gmail.com' Ashish Kumar
  18. wilford.lam@gmail.com' Shannan Tjalk
  19. martina.talarico@warpmail.net' Matrina Whesel

Leave a Reply

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