MySQL read_log_event(): 'Found invalid event in binary log'

來源:互聯網
上載者:User

MySQL read_log_event(): 'Found invalid event in binary log'

MySQL以簡單易用著稱,在同一個伺服器上可以安裝N個不同的版本,方便測試,遷移等等。此外,對於大多數Linux系統,整合了mysql,預設會被安裝。因此多版本的問題導致一些莫名的錯誤也是時有發生。最近在提取binlog日誌時,碰到了一個read_log_event,Found invalid event in binary log。經查發現原來是mysqlbinlog版本問題引發的。如下文,供大家參考。

1、故障描述
[root@HKBO bak]# mysqlbinlog --start-datetime="2014-12-15 00:30:00" mysql-bin.000399bk |more
ERROR: Error in Log_event::read_log_event(): 'Found invalid event in binary log', data_len: 376, event_type: 19
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at 4
#141213 21:05:01 server id 11  end_log_pos 120  Start: binlog v 4, server v 5.6.12-log created 141213 21:05:01
# Warning: this binlog is either in use or was not closed properly.
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;

2、故障分析與解決
#查看當前是哪一個mysqlbinlog檔案
[root@HKBO bak]# which mysqlbinlog
/usr/bin/mysqlbinlog

#查看mysqlbinlog的版本,此時為3.2
[root@HKBO bak]# mysqlbinlog --version
mysqlbinlog Ver 3.2 for RedHat-linux-gnu at x86_64
#Author : Leshami
#Blog  :

Ubuntu 14.04下安裝MySQL

《MySQL權威指南(原書第2版)》清晰中文掃描版 PDF

Ubuntu 14.04 LTS 安裝 LNMP Nginx\PHP5 (PHP-FPM)\MySQL

Ubuntu 14.04下搭建MySQL主從伺服器

Ubuntu 12.04 LTS 構建高可用分布式 MySQL 叢集

Ubuntu 12.04下原始碼安裝MySQL5.6以及Python-MySQLdb

MySQL-5.5.38通用二進位安裝

--------------------------------------分割線 --------------------------------------

本文永久更新連結地址:

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.