I am working on Ubuntu OS 16.04. I am starting mongodb using commands:: sudo service mongod start and then mongo
sudo service mongod start
mongo
It generated this error for m
This error occurs when your mongodb server is not running on 27017 port. Try the below command to start the mongodb server.
mongodb server
27017
sudo systemctl start mongod
And after running this command run the mongo command.