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

Source: Internet
Author: User
Tags mysql command line

MySQL is known for its ease of use, with the ability to install n different versions on the same server, facilitate testing, migrations, and more. In addition, for most Linux systems, the integration of MySQL, the lack of capital is installed. Therefore, multiple versions of the problem caused some inexplicable errors are also occurring. Recently, when extracting the Binlog log, a read_log_event,found invalid event in binary log was encountered. It was found that the original version of the Mysqlbinlog issue. As below, for your reference.

1. Fault description
[Email protected] 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 @[email protected] @COMPLETION_TYPE, completion_type=0*/;
DELIMITER/*!*/;
# at 4
#141213 21:05:01 Server ID end_log_pos start:binlog v 4, Server v 5.6.12-log created 141213 21:05:01
# Warning:this Binlog is either on use or was not closed properly.
DELIMITER;
# End of log file
ROLLBACK/* Added by Mysqlbinlog */;
/*!50003 SET [email protected]_completion_type*/;

2, fault analysis and resolution
#查看当前是哪一个mysqlbinlog文件
[email protected] bak]# which mysqlbinlog
/usr/bin/mysqlbinlog

#查看mysqlbinlog的版本, this is 3.2
[Email protected] bak]# Mysqlbinlog--version
Mysqlbinlog Ver 3.2 for Redhat-linux-gnu at x86_64
#Author: Leshami
#Blog: Http://blog.csdn.net/leshami

[Email protected] bak]# Whereis Mysqlbinlog
Mysqlbinlog:/usr/bin/mysqlbinlog/usr/share/man/man1/mysqlbinlog.1.gz

#此服务器的安装路径其实质如为/app/soft/mysql/, View Mysqlbinlog version 3.4
[[email protected] bak]#/app/soft/mysql/bin/mysqlbinlog--version
/app/ Soft/mysql/bin/mysqlbinlog Ver 3.4 for Linux at x86_64

#下面使用正确路径的mysqlbinlog, success at this time
[[ Email protected] bak]#/app/soft/mysql/bin/mysqlbinlog--start-datetime= "2014-12-15 00:30:00" MYSQL-BIN.000399BK |more
/*!50530 SET @ @SESSION. pseudo_slave_mode=1*/;
/*!40019 SET @ @session. max_insert_delayed_threads=0*/;
/*!50003 SET @[email protected] @COMPLETION_TYPE, completion_type=0*/;
DELIMITER/*!*/;
# at 4
#141213 21:05:01 server ID 11  end_log_pos CRC32 0xaafb2293      & nbsp;  Start:binlog v 4, Server v 5.6.12-log created 141213 21:05:01
# warning:this Binlog is either on use or W As not closed properly.
BINLOG '
ftmmva8laaaadaaaahgaaaabaaqans42ljeylwxvzwaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
Aaaaaaaaaaaaaaaaaaaaaaaaezgnaagaegaebaqeegaaxaaegggaaaaicagcaaaacgokgrkaazmi
+6o=
'/*!*/;
# at 594054457

#查看当前系统mysql的版本
#/app/soft/mysql/bin/mysql--version
/app/soft/mysql/bin/mysql Ver 14.14 Distrib 5.6.12, for Linux (x86_64) using Editline Wrapper

#以下的为OS安装时缺省安装的版本
# RPM-QA |grep-i MySQL
Mysql-5.0.95-3.el5

3. Summary
A, for the deployment of the production environment MySQL, we recommend that you do not install the default MySQL before installing the OS or uninstall the default MySQL after installation
b, due to the need to have multiple versions of the situation, you should consider using the direct path method to execute the corresponding MySQL command line tool

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.