0

I'm trying to get MongoDB installed and running on my new Windows 7 computer. However, I cannot seem to be able to connect to MongoDB when using the mongo shell.

MongoDB shell version v4.0.0 connecting to: mongodb://127.0.0.1:27017 2018-07-31T16:33:22.968+0530 E QUERY [js] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed: SocketException: Error connecting to 127.0.0.1:27017 :: caused by :: No connection could be made because the target machine actively refused it. : connect@src/mongo/shell/mongo.js:251:13 @(connect):1:6 exception: connect failed

  • Make sure Mongo DB running on your machine,Run mongod command before running mongo shell and also you may have to create data directory for MongoBb to store collection data – Sandeep Patel Jul 31 '18 at 11:41
  • 1
    https://stackoverflow.com/questions/23726684/mongodb-on-a-windows-7-machine-no-connection-could-be-made – gaurav singh Jul 31 '18 at 11:51

0 Answers0