ERROR: Error in Log_event: read_log_event ()

Source: Internet
Author: User

Analyze slave database 1062 issues and parse slave database binlog. The error is as follows:

[Root @ xxxdb0402 tmp] # mysqlbinlog mysql-bin.004271> 4.log
ERROR: Error in Log_event: read_log_event (): 'read error', data_len: 438, event_type: 2
[Root @ xxxdb0402 tmp] # grep 'rding '4.log> rd4.log
[Root @ xxxdb0402 tmp] # ll rd4.log
-Rw-r -- 1 root 0 Sep 3 :50 rd4.log
Null. The fourth log is not input.


There are three solutions for a strange error: google

1. Write the full path

[Root @ xxxdb0402 tmp] #/opt/mysql/product/5.5.25a/bin/mysqlbinlog mysql-bin.004271> 4.log
ERROR: Error in Log_event: read_log_event (): 'read error', data_len: 438, event_type: 2
[Root @ xxxdb0402 tmp] # whereis mysqlbinlog
Mysqlbinlog:/usr/bin/mysqlbinlog
[Root @ xxxdb0402 tmp] #/usr/bin/mysqlbinlog mysql-bin.004271> 4.log
/Usr/bin/mysqlbinlog: Character set '# 45' is not a compiled character set and is not specified in the'/usr/share/mysql/charsets/Index. xml' file
ERROR: Error in Log_event: read_log_event (): 'read error', data_len: 438, event_type: 2


2 plus-f forced resolution

[Root @ xxxdb0402 tmp] # mysqlbinlog-f mysql-bin.004271> 4.log
ERROR: Error in Log_event: read_log_event (): 'read error', data_len: 438, event_type: 2


3. When the copied log is used, the db is writing data to the log, and the binlog is copied to/tmp.

Copy the binlog again and parse it again.
[Root @ xxxdb0402 tmp] # cp/mysqldata/data/mysql-bin.004271/tmp/
Cp: overwrite '/tmp/mysql-bin.004271 '? Y
[Root @ xxxdb0402 tmp] #/opt/mysql/product/5.5.25a/bin/mysqlbinlog mysql-bin.004271> 4.log
ERROR: Error in Log_event: read_log_event (): 'read error', data_len: 438, event_type: 2


The same error is reported for all three solutions. Mysql version 5.5.25a. Centos6.0 in linux


How can this problem be solved?


I suggest using mysqlbinlog directly under the mysql DATA DIRECTORY.

[Root @ xxxdb0402 data] #/opt/mysql/product/5.5.25a/bin/mysqlbinlog-f mysql-bin.004271> 4.log
ERROR: Error in Log_event: read_log_event (): 'read error', data_len: 438, event_type: 2

The result is the same.

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.