mongodb
Step 2 — Checking the Service and Database
sudo systemctl status mongodb
mongo --eval 'db.runCommand({ connectionStatus: 1 })'
Step 3 — Managing the MongoDB Service
- sudo systemctl status mongodb
You can stop the server anytime by typing:
- sudo systemctl stop mongodb
To start the server when it is stopped, type:
- sudo systemctl start mongodb
You can also restart the server with a single command:
- sudo systemctl restart mongodb
By default, MongoDB is configured to start automatically with the server. If you wish to disable the automatic startup, type:
- sudo systemctl disable mongodb
It’s just as easy to enable it again. To do this, use:
- sudo systemctl enable mongodb
It was a good information and Its really worth reading it.
ReplyDeleteFull Stack Training in Chennai | Certification | Online Training Course| Full Stack Training in Bangalore | Certification | Online Training Course | Full Stack Training in Hyderabad | Certification | Online Training Course | Full Stack Developer Training in Chennai | Mean Stack Developer Training in Chennai | Full Stack Training | Certification | Full Stack Online Training Course