2018-02-02 16:40:01: purge_relay_logs script started. Opening /data/mysql/3110/data/relay-bin.000012 .. Opening /data/mysql/3110/data/relay-bin.000013 .. Executing SET GLOBAL relay_log_purge=1; FLUSH LOGS; sleeping a few seconds so that SQL thread can delete older relay log files (if it keeps up); SET GLOBAL relay_log_purge=0; .. ok. 2018-02-02 16:40:04: All relay log purging operations succeeded. #MySQL中 $./vc-mysql-sniffer --binding "[::]:3110"|grep -v "#" USE ``; SHOW SLAVE STATUS; SELECT @@global.relay_log_purge As Value; SELECT VERSION() AS Value; SELECT @@global.relay_log_info_repository AS Value; SELECT Relay_log_name FROM mysql.slave_relay_log_info; SELECT @@global.datadir AS Value; SELECT GET_LOCK('MHA_Master_High_Availability_Failover', '200') AS Value; SELECT VERSION() AS Value; SET GLOBAL relay_log_purge=1; FLUSH NO_WRITE_TO_BINLOG /*!50501 RELAY */ LOGS; SET GLOBAL relay_log_purge=0; SELECT RELEASE_LOCK('MHA_Master_High_Availability_Failover') As Value; 解析:1.先检查是否开启了自动清理relay log