Problem starting mongoDB server on Windows 8? Resolved

Everyone is loving NoSQL and mainly MongoDB. I thought to start getting my hand dirty on this. So to start with downloaded MongoDB for Windows and installed it. So far so good.

Next I browsed to MongoDB folder. To start server typed mongo.exe command. Oops encountered following error that could not connect to server.


Okay so to start using mongoDB first we need to start mongoDB server. That can be done as by using command mongod. So I tried starting mongoDB server using mongod command. Oops again I got following error which clearly says dbpath does not exist.


So let us go ahead and create a folder data\db. We are free to create this folder at any location. However later this folder location should be set with dbpath for mongoDB.


Once data folder is created we need to set dbpath which can be done as follows,


It will take some time to get this command executed. You will notice that there is no error encountered.

Command prompt should stopped at


Next launch another command prompt and type command mongo.exe


Here you see mongoDB is connected to database test. To test successful installation, let us insert one record in test database. To insert command is where test is your database.


After doing these steps mongoDB is installed successfully on your Windows Machine. I hope this post is useful. Thanks for reading.

One thought on “Problem starting mongoDB server on Windows 8? Resolved

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s