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
結果還是一樣的報錯。
相關文章
MySQL查詢重復數(shù)據(jù)(刪除重復數(shù)據(jù)保留id最小的一條為唯一數(shù)據(jù))
查重是我們在工作中經常會遇到的一個需求,下面這篇文章主要給大家介紹了關于MySQL查詢重復數(shù)據(jù)(刪除重復數(shù)據(jù)保留id最小的一條為唯一數(shù)據(jù))的相關資料,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面來一起學習學習吧2019-03-03MySql中 is Null段判斷無效和IFNULL()失效的解決方案
這篇文章主要介紹了MySql中 is Null段判斷無效和IFNULL()失效的解決方案,具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教2021-06-06mysql制作外鍵出現(xiàn)duplicate?key?name錯誤問題及解決
這篇文章主要介紹了mysql制作外鍵出現(xiàn)duplicate?key?name錯誤問題及解決方案,具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教2023-02-02MySQL數(shù)據(jù)庫之數(shù)據(jù)表操作
這篇文章主要介紹了MySQL數(shù)據(jù)庫之數(shù)據(jù)表操作,文章基于MySQL數(shù)據(jù)庫的相關資料展開詳細的數(shù)據(jù)表操作的詳情,具有一定的參考價值,需要的小伙伴可以參考一下2022-05-05MySQL8.0.21安裝步驟及出現(xiàn)問題解決方案
這篇文章主要介紹了MySQL8.0.21安裝步驟及出現(xiàn)問題解決方案,本文通過圖文并茂的形式給大家介紹的非常詳細,對大家的學習或工作具有一定的參考借鑒價值,需要的朋友可以參考下2020-12-12