Part 1: Install and Configure MongoDB on windows

This tutorial help to install mongodb server into windows. I will also let you know configuration with php server.We will use mongodb driver to connect php with mongodb.

The MongoDB is very popular nosql database in web development, Here i am creating a series of tutorial about MongoDB with php, i am using windows for development environment so all the steps illustrated here for windows.I will cover following steps regarding mongo db with php.

  1. Installation of mongo db on windows.
  2. Installation of mongo db driver on xampp.

Steps to install MongoDB on Windows

  • Download latest MongoDB 64-bit MSI version for windows .msi file and run.
  • Add bin path (C:\Program Files\MongoDB\Server\3.0\bin) into your environment variable to access mongodb from command line.
  • Create data and db folder under your MongoDB home directory.My install directory is C, So I have created folder (C:\data\db), as mentioned in mongodb docs. This is default directory of mongoDB, so don’t create anywhere else in computer.
  • Now open cmd line (C:\user\palam>) and type mongod to start mongo server, Now you can see message into the command window – “successfully connected with”
  • Open another cmd line (C:\user\palam>) and type mongo 'mongo -version' and press 'ENTER', You will see installed version of MongoDB.

Mongo Server UI

You can also get web UI of Mongodb as like phpMyAdmin using node module, You can install MongoUI using below command,
npm i -g mongoui
-g options use to install mongo ui globally, You need to just open command line and type cmd>mongoui, This command will start mongoui on 3000 port.

You can get all mongodb collection on http://localhost:3001 url, You need to open (http://localhost:3001) on any browser.


In This tutorial We have learn how to install mongoDB on windows, its very simple and easy to install mongoDB on windows.We have integrated php mongo driver with php server as well.I have also started mongo server using command line on windows.

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.