couldn’t connect to server 127.0.0.1:27017
Hi, developing a MEAN project. My mongoDB deployment is on mlab.com and as production I am connection to deployment, as a development connecting to local, actually trying to… As you can see the error, I got the same log after I write
> mongo on Terminal.
warning: Failed to connect to 127.0.0.1:27017, Preformatted textreason: errno:111 Connection refused Error: couldn't connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed at src/mongo/shell/mongo.js:146 exception: connect failed
I’d like to connect my localdb and also I wanna manage my deployment on Terminal. However I cannot connect my mongo shell.
I can connect my deployment on mongolab when I try this:
nodemon server.js nodemon app.js
js files, connection string is defined and it both inserts and selects document from deployment on mlab.com without any errors. Still don’t understand why cannot connect local, mongo shell.