Unable to connect to server No connection could be made because the target machine actively refused it

MongoDB is a lightweight database which can be widely used in NodeJs applications to store and retrieve data.

If you are facing this error, the follow the steps and you will be able to run your MongoDB on your system.



If you are facing this type of problem in Windows 8, then you do only these:-

Go through these steps and you can definitely run Mongo on your Windows 8 OS.

1)  Create a directory in C:. In my case: Data.

And open CMD and type:-


mkdir data

cd “C:\Program Files\MongoDB\Server\3.0\bin”         If your system is x86 and your using latest MongoDb.

mongod –dbpath C:\data


2)  Now open another CMD and type:-


cd “C:\Program Files\MongoDb\Server\3.0\bin”


Now you will look like this.


Your MongoDB database is now running.



Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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