Reputation:
MongoDB is not connecting to the data bases. I added the path.
Whenever I run mongo
it attempts to connect to test
byt fails.
Error:
No connection could be made because the target machine actively refused it
Couldn't connect to the server 127.0.0.1:27017
Someone please help me!
Upvotes: 1
Views: 448
Reputation: 10082
Ensure Following:
Step1: Set path in Environment Variable.
\Program Files\MongoDB 2.6 Standard\bin;
Step 2: Create data directory
md \data
md \data\d
Step 3: Start mongo Shell
mongod
Step 4: Start Mongo
mongo
This Video from mongo university will help understand more easily.
Upvotes: 2