mysql> show variables like 'binlog_format';
+---------------+-----------+
| Variable_name | Value |
+---------------+-----------+
| binlog_format | STATEMENT |
+---------------+-----------+
1 row in set (0.00 sec)
要更改它:
mysql> SET GLOBAL binlog_format = 'STATEMENT';
mysql> SET GLOBAL binlog_format = 'ROW';
mysql> SET GLOBAL binlog_format = 'MIXED';
查看当前 binlog_format 值:
要更改它:
来源:http ://dev.mysql.com/doc/refman/5.1/en/binary-log-setting.html
Matt Healy 回答了关于如何从 mysql 客户端(在运行的服务器上)显示/设置格式的问题
SET GLOBAL binlog_format = [STATEMENT|ROW|MIXED]
要永久设置该值,并假设您可以访问 my.cnf,请添加:
然后重新启动您的服务器。