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
空的,第四個(gè)日志沒(méi)有錄入操作
奇怪報(bào)錯(cuò)了,google之,3種方案
1 寫(xiě)全路徑
[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強(qiáng)制解析
[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 這個(gè)copy過(guò)來(lái)的日志的時(shí)候,db正往日志里面寫(xiě)數(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種方案都報(bào)一樣的錯(cuò)誤。Mysql版本5.5.25a。linux環(huán)境centos6.0
這個(gè)問(wèn)題如何搞定,比較詭異?
朋友建議直接在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é)果還是一樣的報(bào)錯(cuò)。
相關(guān)文章
教你使用VS?Code的MySQL擴(kuò)展管理數(shù)據(jù)庫(kù)的方法
這篇文章主要介紹了使用VS?Code的MySQL擴(kuò)展管理數(shù)據(jù)庫(kù),在本文告訴你如何用VS?Code的擴(kuò)展程序管理MySQL數(shù)據(jù)庫(kù),包括連接到MySQL、新建數(shù)據(jù)庫(kù)和表、修改字段定義、簡(jiǎn)單的查詢方法以及導(dǎo)入導(dǎo)出,需要的朋友可以參考下2022-01-01
在同一臺(tái)機(jī)器上運(yùn)行多個(gè) MySQL 服務(wù)
在同一臺(tái)機(jī)器上運(yùn)行多個(gè) MySQL 服務(wù)...2006-11-11
mysql 選擇插入數(shù)據(jù)(包含不存在列)具體實(shí)現(xiàn)
mysql 選擇插入數(shù)據(jù)的文章會(huì)搜到很多本例特色是包含不存在列,具體實(shí)現(xiàn)如下,感興趣的朋友可以參考下,希望對(duì)大家有所幫助2013-08-08
mysql執(zhí)行計(jì)劃id為空(UNION關(guān)鍵字)詳解
這篇文章主要給大家介紹了關(guān)于mysql執(zhí)行計(jì)劃id為空(UNION關(guān)鍵字)的相關(guān)資料,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)學(xué)習(xí)吧2018-09-09
mysql之查找所有數(shù)據(jù)庫(kù)中沒(méi)有主鍵的表問(wèn)題
這篇文章主要介紹了mysql之查找所有數(shù)據(jù)庫(kù)中沒(méi)有主鍵的表問(wèn)題,具有很好的參考價(jià)值,希望對(duì)大家有所幫助。如有錯(cuò)誤或未考慮完全的地方,望不吝賜教2023-03-03
mysql 8.0.22壓縮包完整安裝與配置教程圖解(親測(cè)安裝有效)
這篇文章主要介紹了mysql 8.0.22壓縮包完整安裝與配置教程圖解(親測(cè)安裝有效),本文通過(guò)圖文并茂的形式給大家介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或工作具有一定的參考借鑒價(jià)值,需要的朋友可以參考下2020-12-12
Mysql8.0密碼問(wèn)題mysql_native_password和caching_sha2_password詳解
這篇文章主要介紹了Mysql8.0密碼問(wèn)題mysql_native_password和caching_sha2_password,具有很好的參考價(jià)值,希望對(duì)大家有所幫助,如有錯(cuò)誤或未考慮完全的地方,望不吝賜教2024-08-08

