Fix mongodb service is not starting up
Sometimes (not many) MongoDB can’t start normally, if there isn’t any configuration change for your side, you can fix it using the following commands.
sudo rm /var/lib/mongo/mongod.lock
sudo mongod --repair -dbpath /var/lib/mongo
sudo service mongod start
Tags:
Found a snippet that saved your day? Consider dropping a tip!