可以通过MySQL命令行设置
全局生效
SET GLOBAL binlog_format = 'STATEMENT';
SET GLOBAL binlog_format = 'ROW';
SET GLOBAL binlog_format = 'MIXED';
本会话生效
SET SESSION binlog_format = 'STATEMENT';
SET SESSION binlog_format = 'ROW';
SET SESSION binlog_format = 'MIXED';
也可以通过配置文件设置,这样服务重启也会和配置文件中一致
binlog_format = STATEMENT
binlog_format = ROW
binlog_format = MIXED
查看
select @@session.binlog_format;
select @@global.binlog_format;
show variables like '%binlog_format%';