How to access the http interface of MongoDB

This is a complimentary post following the installation of MongoDB, as you probably now, MongoDB comes with a web interface, easy to visualize what is going on with your MongoDB databases.
To access this web interface, you just need to use the following address.


However, this is not enabled by default. In case you do not have started MongoDB with the web interface enabled you may need to restart the service adding the parameter –httpinterface.


With MongoDB running, open a terminal window and start the MongoDB Shell, just by typing:

$ mongo

Then, use the following commands to shutdown the server.

$ use admin
$ db.shutdownServer()

You are going to see a message similar to this.

Screenshot 2016-02-07 22.29.25

Now, that the server is down you just need to start using the –httpinterface parameter.

$ mongod --httpinterface

If everything goes right, you should be able to access the http://localhost:28017 and see something like this.

Screenshot 2016-02-07 22.35.49

Thank you for visiting. 🙂
Let’s Mongo Together.



Installing and running MongoDB on Mac OSX for beginners!

I have started this series of posts with two goals, record the information for my future use and maybe to help someone starting with these technologies. So, enough chit-chat, let’s move to the business.

What is MongoDB? MongoDB is an open-source, document database designed for ease of development and scaling. The current version is 3.2.

This small tutorial serve as a guide on how to install MongoDB on Mac OSX.

This is the easiest part. The documentation of MongoDB covers all you need to install it over the OSX. Using the Homebrew package manager, all that you need to do is opening a terminal and run the following commands.

brew update
brew install mongodb

This will install MongoDB in the following location:


In fact, you do not need to interact with this folder to use MongoDB, this is just a complimentary information. In this folder you will find the binary folder and the README file.

Once you have download and installed, you can check if MongoDB is working by running the following command.

mongo -version
mongo -help

If the installation was succeed, you should see something similar to this:

Screenshot 2016-02-02 21.18.16


The second step is create the database folder. MongoDB store data into the /data/db folder, you need to create this folder manually and assign proper permission.

$ sudo mkdir -p /data/db
$ whoami
$ sudo chown agabardo /data/db

Next step is adding mongodb/bin to $PATH

$ cd ~
$ pwd
$ touch .bash_profile
$ vim .bash_profile
export MONGO_PATH=/usr/local/mongodb

At this point, if you try mongo -version you should see something similar to this

Screenshot 2016-02-06 19.58.49

Now, open another terminal and start MongoDB with $ mongod. (In case of trouble with permissions you can use $ sudo mongod).

Screenshot 2016-02-06 20.03.29

When you see the message: ‘waiting for connections on port 27017′ means that MongoDB is up and running. Now in another terminal window let’s tryMongoDB shell typing.

$ mongo

The result should be similar to this.

Screenshot 2016-02-06 20.12.24

MongoDB is up and running. In the next post we will import the example database and select some data. I hope the small tutorial can help someone else. The step that is skipped in the official documentation that is how to set the permissions and export the Path is complimentary to the documentation. If find more help here on MongoDB website.