HI I am trying to install mongo database on Ubuntu and after install when I run the command mongo getting this error:
MongoDB shell version: 3.0.6
connecting to: test
2015-10-11T11:43:29.448+0530 W NETWORK Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused
2015-10-11T11:43:29.449+0530 E QUERY Error: couldn't connect to server 127.0.0.1:27017 (127.0.0.1), connection attempt failed
at connect (src/mongo/shell/mongo.js:179:14)
at (connect):1:6 at src/mongo/shell/mongo.js:179
exception: connect failed
Thanks
Check if mongodb service is running with service mongod status
If it's not - run sudo service mongod start
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.