Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in or
create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision |
Your text |
Line 1: |
Line 1: |
| MongoDB is a database used to manage and create databases. | | MongoDB is a database used to manage and create databases. |
|
| |
| = Useful commands =
| |
| == Completely uninstall MongoDB ==
| |
| If you've messed up your MongoDB installation and want to completely uninstall use these commands<ref>https://askubuntu.com/a/1054726</ref>:
| |
|
| |
| # sudo service mongod stop
| |
| # sudo apt-get purge mongodb-org*
| |
| # sudo rm -r /var/log/mongodb
| |
| # sudo rm -r /var/lib/mongodb
| |
|
| |
|
| = Issues = | | = Issues = |
Line 15: |
Line 6: |
|
| |
|
| '''Solution''' | | '''Solution''' |
| | | Attempt to repair the MongoDB installation by running the command |
| Attempt to repair the MongoDB installation by running the command: | |
|
| |
|
| sudo mongod --repair | | sudo mongod --repair |
Line 29: |
Line 19: |
| # sudo systemctl start mongod | | # sudo systemctl start mongod |
| # sudo systemctl status mongod | | # sudo systemctl status mongod |
|
| |
| == MongoDB fails to start immediately after installation ==
| |
| When running the command ''sudo systemctl start mongod'' an error will appear saying:
| |
|
| |
| Failed to start mongod.service: Unit mongod.service not found.
| |
|
| |
| '''Solution'''
| |
|
| |
| Enter the command:
| |
|
| |
| sudo systemctl enable mongod
| |
|
| |
| This will link the service and allow it to start.
| |
|
| |
| = References =
| |
|
| |
| [[Category:Website Software]]
| |