These days have been tossing the MongoDB database, has been the following this problem
MongoDB Shell version v3.6.0connecting TO:MONGODB://127.0.0.1:27017in for Error after poll), Reason:connection refused2017-12-27t09:54:34.778+0800 E QUERY [thread1] error:couldn ' t connect to server 127.0.0.1:27017, connection attempt failed: [Email protected]/mongo/shell/mongo.js:237:13@ ( Connect): 1:6exception:connect failed
Try all sorts of ways.
This error occurs when the MongoDB service is not running
The attempt to create a new/data/db directory does not work.
Later through search, find the arrival solution, run the command
Brew Services Start MongoDB
To call the database command again
Mongo
We can solve the problem perfectly.
Tips for successful display under the final Mac
MongoDB Shell version v3.6.0connecting TO:MONGODB://127.0.0.1:27017MongoDB Server version : 3.6.02017-12-27t09:54:58.316+0800 i control 2017-12-27t09:54:58.316+0800 I control for the database. 2017-12-27t09:54:58.316+0800 i CONTROL [initandlisten] * * Read and write access to data and configuration I s unrestricted. 2017-12-27t09:54:58.316+0800 I CONTROL
Mac MongoDB Connect failed connection Error resolution