我有一个主/从MySQL复制在生产级别上工作一天,但每天,复制停止工作。但是每件事都说没关系:
显示奴隶状态; show Slave_IO_Running和Slave_SQL_Running是的。
如果我执行:
stop slave;
SET GLOBAL SQL_SLAVE_SKIP_COUNTER = 1;
start slave;
复制再次起作用并且#34;秒落后于主人"开始下降到零。但我需要找到什么打破复制。
深入挖掘,我在mysql.log
找到了这个:
2017-06-17 00:19:48 3084 [注意]' SQL_SLAVE_SKIP_COUNTER = 1'执行于 relay_log_file =' ./ mysqld-relay-bin.000055',relay_log_pos =' 632837719', master_log_name =' mysql-bin.000046',master_log_pos =' 632837556'和新的 位于relay_log_file =' ./ mysqld-relay-bin.000055', relay_log_pos =' 638878870',master_log_name =' mysql-bin.000046', MASTER_LOG_POS =' 638878707'
所以我执行了:
[root@ip-172-31-19-9 mysql]# mysqlbinlog --no-defaults -v mysql-bin.000046 --start-position=632837554 --stop-position=632837558
结果是:
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/; /*!40019 SET
@@session.max_insert_delayed_threads=0*/; /*!50003 SET
@OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER
/*!*/;
# at 4
#170616 17:35:09 server id 1 end_log_pos 120 CRC32 0xcc698d98 Start: binlog v 4, server v 5.6.36-log created 170616 17:35:09
# Warning: this binlog is either in use or was not closed properly. BINLOG '
/UBEWQ8BAAAAdAAAAHgAAAABAAQANS42LjM2LWxvZwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAEzgNAAgAEgAEBAQEEgAAXAAEGggAAAAICAgCAAAACgoKGRkAAZiN
acw= '/*!*/; ERROR: Error in Log_event::read_log_event(): 'Found
invalid event in binary log', data_len: 4653056, event_type: 68
DELIMITER ;
# End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; /*!50530 SET
@@SESSION.PSEUDO_SLAVE_MODE=0*/; [root@ip-172-31-19-9 mysql]#
这是"event_type: 68"
是什么?任何线索?