1

Sometime ago we configured MYSQL replication on our main web server to another CentOS 6 server. All is working perfectly and we can see the replication is working fine.

My question is how to safely reboot either master or slave server without breaking the replication and thus having to reconfigure?

2
  • Check this.
    – taliezin
    Apr 8, 2015 at 13:32
  • Many thanks, that's exactly what I have been looking for. Apr 8, 2015 at 13:35

1 Answer 1

0

If a slave server goes down, replication will stop but it won't require you to reconfigure master/slave replication. The master will simply wait for the slave to become available again at which point pending transactions will be synchronised to the slave. If you need to reboot the master server you will have to promote the slave to master. This can be achieved as follows:

On the master: FLUSH LOGS;

On the slave: STOP SLAVE; RESET MASTER; CHANGE MASTER TO MASTER_HOST='';

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .