Do you Move the slaves in a MySQL master/master setup to slave the other master; assumes master1 and master2 are master/master, slave1, slave2, slave3 are slaves of master1 too?Use this checklist
  1. Put replication monitoring in a downtime for master2, slave1, slave2, slave3

    You will be stopping the slave for brief periods of time on these machines. Also coordinate with anyone who needs to know.

  2. "STOP SLAVE" on slave1, slave2, slave3

  3. stop slave on master2. Check that Exec_Master_Log_Pos on master2 is later than on slave1, slave2, slave3. If not, start slave on slave1/2/3 and do step 2 again.

  4. run the following on slave1, slave2, slave3, using the Master_Log_File and Exec_Master_Log_Pos from SHOW SLAVE STATUS on master2 (after the slave is stopped):

    START SLAVE UNTIL MASTER_LOG_FILE='xxxxx', MASTER_LOG_POS=yyyyyy;

  5. At this point, SHOW SLAVE STATUS run on master2, slave1, slave2, and slave3 should have the same Master_Log_file and Exec_Master_Log_Pos. If not, repeat steps 3-4.

  6. Using the binlog file and position from SHOW MASTER STATUS on master2, run the following on slave1, slave2 and slave3:

    SLAVE STOP; CHANGE MASTER TO MASTER_HOST='master2', MASTER_LOG_FILE='binlog_on_master2', MASTER_LOG_POS=yyyyy; SLAVE START;

    [this assumes that the same replication user and password work for master2 as for master1, which should be the case since master1 and master2 should have identical configurations, except for server_id).

  7. After all the slaves are started and successfully slaving master2, run SLAVE START; on master2.

  8. Wait for monitoring to clear up and remove the downtimes.

×