溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶服務(wù)條款》

如何徹底解析Mixed日志格式的

發(fā)布時(shí)間:2021-11-16 15:24:08 來源:億速云 閱讀:151 作者:柒染 欄目:MySQL數(shù)據(jù)庫

這篇文章將為大家詳細(xì)講解有關(guān)如何徹底解析Mixed日志格式的,文章內(nèi)容質(zhì)量較高,因此小編分享給大家做個(gè)參考,希望大家閱讀完這篇文章后對(duì)相關(guān)知識(shí)有一定的了解。

mysql binlog3種格式,row,mixed,statement. 解析工作

mysqlbinlog --base64-output=DECODE-ROWS -v mysql-bin.000144 |more

--base64-output=DECODE-ROWS: 會(huì)顯示出row模式帶來的sql變更。

-v :顯示statement模式帶來的sql語句

[mysql@002tmp]$ mysqlbinlog --base64-output=DECODE-ROWS -v mysql-bin.000144 |more
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at 4
#140216 23:59:26 server id 3  end_log_pos 107   Start: binlog v 4, server v 5.5.25a-log created 140216 23:59:26
# at 107
#140216 23:59:26 server id 1  end_log_pos 171   Query   thread_id=8557964       exec_time=0     error_code=0
SET TIMESTAMP=1392595166/*!*/;
SET @@session.pseudo_thread_id=8557964/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=6291456/*!*/;
SET @@session.auto_increment_increment=2, @@session.auto_increment_offset=1/*!*/;
/*!\C utf8mb4 *//*!*/;
SET @@session.character_set_client=45,@@session.collation_connection=45,@@session.collation_server=33/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
BEGIN
/*!*/;
# at 171
# at 260
#140216 23:59:26 server id 1  end_log_pos 260   Table_map: `billing`.`billing_account` mapped to number 216
#140216 23:59:26 server id 1  end_log_pos 418   Write_rows: table id 216 flags: STMT_END_F
### INSERT INTO billing.billing_account
### SET
###   @1=80491
###   @2=1000013580491
###   @3=1000056980491
###   @4=1
###   @5=1
###   @6='Integration-Tests'
###   @7=2014-02-16 23:59:26
###   @8='Integration-Tests'
###   @9=2014-02-16 23:59:26
###   @10='Integration-Tests'
###   @11=NULL
###   @12='0'
###   @13=1000105380491
###   @14='0'
###   @15='159.153.208.254'
###   @16=1
###   @17=NULL
# at 418
# at 516
#140216 23:59:26 server id 1  end_log_pos 516   Table_map: `billing`.`credit_card_account` mapped to number 222
#140216 23:59:26 server id 1  end_log_pos 812   Write_rows: table id 222 flags: STMT_END_F
### INSERT INTO billing.credit_card_account
### SET

關(guān)于如何徹底解析Mixed日志格式的就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,可以學(xué)到更多知識(shí)。如果覺得文章不錯(cuò),可以把它分享出去讓更多的人看到。

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI