title: MongoDB Error: couldn't connect to server in linux
body: <p>When I type 'mongo' in terminal to run the mongo server. it doesn't run. It shows me the eroor : couldn't connect to server. exception: connection failed.</p>
  <p>Then I tried to restart mongodb server by</p>
  <pre><code>$ sudo systemctl start mongod 
  $ sudo systemctl status mongod
  </code></pre>
  <p>When I run the status command, I see it is showing</p>
  <pre><code>Loaded: loaded (/lib/systemd/system/mongod.service; disabled; vendor prese
  Active: failed (Result: exit-code)
  </code></pre>
  <p>N.B - I am running linux mint 20.1. And I have read all the answer and tried. But nothing worked for me.</p>
  <p>Oh, I followed <a href="https://www.tecmint.com/install-mongodb-on-ubuntu/" rel="nofollow noreferrer">this guide</a> to install, uninstall and reinstalling MongoDB. But still it is not working for me.</p>