I'm trying to connect to my db remotely, and having some trouble. A popular answer seems to be running
sudo rm /var/lib/mongodb/mongod.lock
sudo service mongodb restart
What are the consequences of running each of these commands? I am especially wondering:
- Am I introducing potential problems by deleting the lock? Surely the lock must be there for a useful reason?
- Will my data stay the same after the restart?