ERROR: Error in Log_event::read_log_event(): 'read error', data_len: 438, event_type: 2
来源:互联网 发布:oracle数据库sql语句 编辑:程序博客网 时间:2024/05/18 15:04
分析从库1062问题,解析从库binlog日志,报错如下
[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--r-- 1 root root 0 Sep 3 17:50 rd4.log
空的,第四个日志没有录入操作
奇怪报错了,google之,3种方案
1 写全路径
[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 加-f强制解析
[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 这个copy过来的日志的时候,db正往日志里面写数据呢,从新copy下binlog到/tmp下。
那就重新copy一次binlog,再解析
[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
[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--r-- 1 root root 0 Sep 3 17:50 rd4.log
空的,第四个日志没有录入操作
奇怪报错了,google之,3种方案
1 写全路径
[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 加-f强制解析
[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 这个copy过来的日志的时候,db正往日志里面写数据呢,从新copy下binlog到/tmp下。
那就重新copy一次binlog,再解析
[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
3种方案都报一样的错误。Mysql版本5.5.25a。linux环境centos6.0
这个问题如何搞定,比较诡异?
朋友建议直接在mysql的数据目录之下用mysqlbinlog试下
[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
结果还是一样的报错。
- ERROR: Error in Log_event::read_log_event(): 'read error', data_len: 438, event_type: 2
- ERROR: Error in Log_event::read_log_event(): 'read error', data_len: 438, event_type: 2
- ERROR: Error in Log_event::read_log_event(): 'read error', data_len: 438, event_type: 2
- ERROR: Error in Log_event::read_log_event(): 'read error', data_len: 234781854, event_type: 2
- ERROR: Error in Log_event::read_log_event()
- ERROR: Error in Log_event::read_log_event()
- ERROR: Error in Log_event::read_log_event():
- ERROR: Error in Log_event::read_log_event(): 'Found invalid event in binary log', data_len: 77, even
- mysql报错:ERROR: Error in Log_event::read_log_event():"Sanity check
- libpng Error:read error
- error: fd0 read error
- squid 的 read error
- Error: read ECONNRESET
- error
- Error
- error
- ERROR
- ERROR
- android File文件的读写操作
- 在 Windows 下使用 Notepad++ 和 xdebug 调试 php 脚本
- 在linux上增加swap交换空间
- 递归与递推的区别
- 四色原型发展
- ERROR: Error in Log_event::read_log_event(): 'read error', data_len: 438, event_type: 2
- Hook IAT实现替换 Native API 以及一般 API
- cocos2d-x 中文乱码问题解决方案
- 0903
- Memcached 结构分析详解
- w7+eclipse +ndk9 NDK开发 hellow ndk 笔记(java调用c)
- Guava之eventbus
- [Chrome源码阅读] 理解Browser进程
- Windows 7 下配置VPN