I was just learning mongodb. I command I entered are :
use admin db.shutdownServer();
This shutdown the database. After that whenever I'm writing mongo to start mongoDB it gives me :
MongoDB shell version: 3.0.12 connecting to: test 2016-10-09T18:24:27.661+0530 W NETWORK Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused 2016-10-09T18:24:27.664+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
When I run this : sudo service mongodb start
I get :
Redirecting to /bin/systemctl start mongodb.service Failed to start mongodb.service: Unit mongodb.service failed to load: No such file or directory.
I tried other different commands (even I've re installed it again) but none of them restarted mongodb.
How to start mongodb?