开启binlog
[mysqld]
log-bin=mysql-bin #添加这一行就ok
binlog-format=ROW #选择row模式
server_id=1 #配置mysql replaction需要定义,不能和canal的slaveId重复
查看binlog状态
mysql> show variables like ‘binlog_format’;
1 | +---------------+-------+ |
show variables like ‘log_bin’;
1 | +---------------+-------+ |