mariadb BINLOG_FORMAT = STATEMENT 异常

当在mariadb中插入数据是报 InnoDB is limited to row-logging 异常:

java.sql.SQLException: Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-based logging. InnoDB is limited to row-logging when transaction isolation level is READ COMMITTED or READ UNCOMMITTED.

 

解决方法

 STOP SLAVE;

 

SET GLOBAL binlog_format=MIXED;

 

 START SLAVE;

 

要想永久性不用敲sql执行,可以更改my.cnf

在mysqld中加入

binlog_format=mixed 

 

posted @ 2017-03-21 10:44  新际航  阅读(437)  评论(0)    收藏  举报