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.