Stop Replica Set MongoDB

后端 未结 3 408
忘了有多久
忘了有多久 2021-01-31 19:25

The command to start a Replica Set in the MongoDB Shell is rs.initiate().

What is the opposite of this command. How do I stop the replica set?

There are commands

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-31 20:04

    1. Go to mongo shell on Secondary servers

    2. Stop the secondary servers by using below command:

      use admin db.shutdownServer()

    2] Go to Linux shell- on secondary servers and type below command:

    sudo service mongod stop
    

    For more information, Please check the below link:

    http://www.tutorial-points.com/2016/03/stopping-and-starting-mongodb.html

提交回复
热议问题