Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed

HI,
Im trying connet to mongo on vagrant@database but this error:

Error: couldn’t connect to server 127.0.0.1:27017, connection attempt failed :
connect@src/mongo/shell/mongo.js:229:14

1 Like

I was running mongod but I didn’t notice the “exception in initAndListen: 29 Data directory /data/db not found., terminating” error before. This fix it. Solution

1 Like