Back

Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in Web Technology by (50.2k points)

With the help of mongo CLI client, can I restart a MongoDB server?

1 Answer

0 votes
by (108k points)

What you can do is you can start the MongoDB server by executing the following syntax as root:

>sudo service mongod start

Or just shut down your server via the client. And then start it.

>mongo --host "hostname where server or IP" --port "port of mondodb server" --username "username" --password "password"

>use admin

>db.shutdownServer()


Want to learn more about MongoDB? Go through this MongoDB course for more insights.

Related questions

0 votes
2 answers
0 votes
2 answers
0 votes
1 answer
asked Feb 9, 2020 in Web Technology by ashely (50.2k points)
0 votes
1 answer
0 votes
2 answers

Browse Categories

...