Binlog日志格式
大黄 Lv4

查看binlog日志格式

1
show variables like 'binlog%';

三种格式的区别

statement 记录sql原文 limit情况下可能是unsafe的,存在错误使用索引的情况

row 会替换成Table_map 和 Delete_rows,记录要操作的表和具体操作的记录

mix 折中,mysql判断会不会引起主从不一致,从而选择row或者statement

statement格式的binlog

Binlog日志格式 statement.png

row格式的binlog

BInlog日志格式 row.png

  • Post title:Binlog日志格式
  • Post author:大黄
  • Create time:2021-12-30 21:56:31
  • Post link:https://huangbangjing.cn/2021/12/30/Binlog日志格式/
  • Copyright Notice:All articles in this blog are licensed under BY-NC-SA unless stating additionally.