ERROR: Error in Log_event::read_log_event()
[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正往日志里面寫數(shù)據(jù)呢,從新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環(huán)境centos6.0
這個問題如何搞定,比較詭異?
朋友建議直接在mysql的數(shù)據(jù)目錄之下用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
結(jié)果還是一樣的報錯。
相關(guān)文章
教你使用VS?Code的MySQL擴展管理數(shù)據(jù)庫的方法
這篇文章主要介紹了使用VS?Code的MySQL擴展管理數(shù)據(jù)庫,在本文告訴你如何用VS?Code的擴展程序管理MySQL數(shù)據(jù)庫,包括連接到MySQL、新建數(shù)據(jù)庫和表、修改字段定義、簡單的查詢方法以及導(dǎo)入導(dǎo)出,需要的朋友可以參考下2022-01-01
mysql 選擇插入數(shù)據(jù)(包含不存在列)具體實現(xiàn)
mysql 選擇插入數(shù)據(jù)的文章會搜到很多本例特色是包含不存在列,具體實現(xiàn)如下,感興趣的朋友可以參考下,希望對大家有所幫助2013-08-08
mysql執(zhí)行計劃id為空(UNION關(guān)鍵字)詳解
這篇文章主要給大家介紹了關(guān)于mysql執(zhí)行計劃id為空(UNION關(guān)鍵字)的相關(guān)資料,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2018-09-09
mysql之查找所有數(shù)據(jù)庫中沒有主鍵的表問題
這篇文章主要介紹了mysql之查找所有數(shù)據(jù)庫中沒有主鍵的表問題,具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教2023-03-03
mysql 8.0.22壓縮包完整安裝與配置教程圖解(親測安裝有效)
這篇文章主要介紹了mysql 8.0.22壓縮包完整安裝與配置教程圖解(親測安裝有效),本文通過圖文并茂的形式給大家介紹的非常詳細(xì),對大家的學(xué)習(xí)或工作具有一定的參考借鑒價值,需要的朋友可以參考下2020-12-12
Mysql8.0密碼問題mysql_native_password和caching_sha2_password詳解
這篇文章主要介紹了Mysql8.0密碼問題mysql_native_password和caching_sha2_password,具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教2024-08-08

