MySQL数据库之mysql如何彻底解析Mixed日志格式的binlog
小标 2019-01-04 来源 : 阅读 1462 评论 0

摘要:本文主要向大家介绍了MySQL数据库之mysql如何彻底解析Mixed日志格式的binlog ,通过具体的内容向大家展现,希望对大家学习MySQL数据库有所帮助。

本文主要向大家介绍了MySQL数据库之mysql如何彻底解析Mixed日志格式的binlog ,通过具体的内容向大家展现,希望对大家学习MySQL数据库有所帮助。


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

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

--base64-output=DECODE-ROWS: 会显示出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 


   

本文由职坐标整理并发布,希望对同学们学习MySQL有所帮助,更多内容请关注职坐标数据库MySQL数据库频道!

本文由 @小标 发布于职坐标。未经许可,禁止转载。
喜欢 | 0 不喜欢 | 0
看完这篇文章有何感觉?已经有0人表态,0%的人喜欢 快给朋友分享吧~
评论(0)
后参与评论

您输入的评论内容中包含违禁敏感词

我知道了

助您圆梦职场 匹配合适岗位
验证码手机号,获得海同独家IT培训资料
选择就业方向:
人工智能物联网
大数据开发/分析
人工智能Python
Java全栈开发
WEB前端+H5

请输入正确的手机号码

请输入正确的验证码

获取验证码

您今天的短信下发次数太多了,明天再试试吧!

提交

我们会在第一时间安排职业规划师联系您!

您也可以联系我们的职业规划师咨询:

小职老师的微信号:z_zhizuobiao
小职老师的微信号:z_zhizuobiao

版权所有 职坐标-一站式IT培训就业服务领导者 沪ICP备13042190号-4
上海海同信息科技有限公司 Copyright ©2015 www.zhizuobiao.com,All Rights Reserved.
 沪公网安备 31011502005948号    

©2015 www.zhizuobiao.com All Rights Reserved

208小时内训课程