使用mysqlbinlog恢复日志时返回如下报错
[root@localhost log]# mysqlbinlog mysql-bin.000003 mysql-bin.000004 --start-position=1206 > t.sql ERROR: Error in Log_event::read_log_event(): 'Sanity check failed', data_len: 41, event_type: 30 ERROR: Could not read entry at offset 1331: Error in log format or read error.
在网上查找案例,因为mysqlbinlog版本和bin log不匹配。
因为我是从mysql 5.5升级到5.6,系统环境变量里还是指向mysql 5.5的bin目录。设置为绝对路径后成功。
[root@localhost mysql3306]# ./bin/mysqlbinlog /home/mysql3306/log/mysql-bin.000003 /home/mysql3306/log/mysql-bin.000004 --start-position=1206 > t.sql
|