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

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.

mongo_error

mongo_unable_to_connect

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:-

cd/

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

step1

2)  Now open another CMD and type:-

cd/

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

mongo

Now you will look like this.

step2

Your MongoDB database is now running.

Enjoy…………..

Advertisements

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s