ERROR: Error in Log_event::read_log_event()
程序员文章站
2024-02-26 16:19:22
分析从库1062问题,解析从库binlog日志,报错如下[root@xxxdb0402 tmp]# mysqlbinlog mysql-bin.004271 > 4....
分析从库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
结果还是一样的报错。
上一篇: java更改图片大小示例分享
推荐阅读
-
ERROR: Error in Log_event::read_log_event()
-
【秒懂+解决方案】git error: The following untracked working tree files would be overwritten by checkout: ...
-
解决bash: syntax error near unexpected token `(‘ 的错误
-
ERROR 2002 (HY000): Can't connect to local 博客分类: mysql
-
如何在Eclipse PDE的Error Log View中显示自己的Log 博客分类: Eclipse Plug-in开发 Eclipse工作
-
ERROR 1130 (HY000): Host 'localhost' 博客分类: mysql
-
asp.net错误捕获(错误处理)page_error事件使用方法
-
asp.net错误处理Application_Error事件示例
-
mysql中一个普通ERROR 1135 (HY000)错误引发的血案
-
解析mysql数据库还原错误:(mysql Error Code: 1005 errno 121)