Installing MongoDB Community on Ubuntu
A small guide to install MongoDB Community on Ubuntu. This guide was created after a minor inconvenience I faced to get the server up and running.
Getting Started
The starting few steps can be found here on their website
Starting the mongodb server -
| Bash | |
|---|---|
1 | |
Checking the status of the server -
| Bash | |
|---|---|
1 | |
Stopping the mongodb server -
| Bash | |
|---|---|
1 | |
Error faced
On trying to get the server status I always got the following error -
Active: failed (Result: exit-code)
I tried all the troubleshooting guides until I stumbled on a StackOverflow answer detailing the solution to this Just do those two commands for temporary solution:
| Bash | |
|---|---|
1 2 | |
Cause of the error
For details:
That shall be fault due to user permissions in .sock file, You may have to change the owner to monogdb user.
| Bash | |
|---|---|
1 2 | |
Uninstall MongoDB completely
| Bash | |
|---|---|
1 2 3 4 | |