We have a MySQL setup running a single master and two replication slaves. We recently ran into a scenario where SlaveIO had stopped on one of the replication slaves and SlaveSQL had stopped on the other replication slave. This had silently stopped replication on both slave servers.
I decided to write a monitoring plugin for Nagios to keep an eye on the status of SlaveIO and SlaveSQL. The problem I am having is emulating the scenarios we ran into above. I can issue a “STOP SLAVE” command to stop both SlaveIO and SlaveSQL, but I would like to stop each individually to be sure the script reacts correctly.
Is this possible?
Try
SLAVE STOP SQL_THREADandSLAVE STOP IO_THREADSee “Pausing Replication on the Slave” in the MySQL manual.