MySQL Found invalid event in binary log
2016-07-12 by dongnan
错误描述
# 执行命令
mysqlbinlog mysql-bin.000063 | more
ERROR: Error in Log_event::read_log_event(): 'Found invalid event in binary log', data_len: 71, event_type: 35
ERROR: Could not read entry at offset 120: Error in log format or read error.
/*!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
#160524 0:38:27 server id 46530485 end_log_pos 120 CRC32 0xc0b795db Start: binlog v 4, server v 5.6.16-log created 160524 0:38:27
BINLOG '
g6JDVw+1/8UCdAAAAHgAAAAAAAQANS42LjE2LWxvZwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAEzgNAAgAEgAEBAQEEgAAXAAEGggAAAAICAgCAAAACgoKGRkAAduV
t8A=
'/*!*/;
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
错误原因
mysqlbinlog
的版本较低,而 binlog
文件版本较高,导致 mysqlbinlog
无法读取 binlog
。
解决方法
使用高版本 mysqlbinlog
命令读取 binlog
。