How can I stop mongodb from starting on system boot
Solution 1:
I can't test it at the moment, but I think this should work
sudo update-rc.d mongodb disable
If this is not enough try this
sudo update-rc.d -f mongodb remove
Solution 2:
This is borrowed from this answer:
echo manual | sudo tee /etc/init/mongod.override
Solution 3:
This worked for me and I'm using Ubuntu 18.04:
sudo systemctl disable mongod
Solution 4:
@davelupt's reference is great. However I guess the command should be
echo manual | sudo tee /etc/init/mongod.override
since the file for MongoDB under /etc/init is mongod.conf
.