Install MongoDB in Window

In this tutorial, I will show you how we can install the MongoDB in Window environment.

Download MongoDB

To download MongoDB, you can go to the download page of MongoDB at, and choose the version suitable for your machine.

Currently, the latest version of MongoDB is 3.2.9.

I am using Window 8 64bit, so I will download the version 64bit of MongoDB for Window. The binary file which I downloaded, named mongodb-win32-x86_64-3.2.9-signed.msi.

Steps to install

After downloading the install package to your machine, you can double click on the binary file. A dialog will be displayed as below:

Install MongoDB in Window

Press button Next to continue.

Install MongoDB in Window

Click the checkbox I accept the terms in the License Agreement, then press button Next.

Install MongoDB in Window

Here, you can press the button Complete to install all existing features of MongoDB.

Install MongoDB in Window

Press button Install to start the installation.

Install MongoDB in Window

After the installation is completed

Install MongoDB in Window

You can press the button Finish to finish installing MongoDB into our computer.

By default, MongoDB will be installed at C:\Program Files\MongoDB\Server\3.2.

Environment configuration for MongoDB

To run, MongoDB need a folder to store the data. By default, this folder will be located at C:\data\db. So that, we need to create this folder:

Install MongoDB in Window

Run MongoDB

MongoDB will use the file, named mongod.exe in the folder C:\Program Files\MongoDB\Server\3.2\bin to run.

So that, you need open the command line and go to the folder C:\Program Files\MongoDB\Server\3.2\bin, then run MongoDB by using this file mongod.exe as below:

Install MongoDB in Window

Now, we ran MongoDB sucessfully!

Connect to MongoDB

To connect to MongoDB, we will use the file mongo.exe in the same folder of mongod.exe, C:\Program Files\MongoDB\Server\3.2\bin.

See result:

Install MongoDB in Window

Đánh giá bài viết
Chia sẽ bài viết này ...Share on Facebook
0Tweet about this on Twitter
Share on LinkedIn

Add Comment