MySQL复制错误]Last_Errno: 1666 Last_Error: Error executing row event: 'Cannot execute statement: imposs
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
貌似是statement模式不足以应付应用,换成mixed试试看吧:
在从库执行:
mysql> stop slave;
Query OK, 0 rows affected (0.00 sec)
mysql> start slave;
Query OK, 0 rows affected (0.01 sec)
登录主库:
mysql> SET GLOBAL binlog_format=MIXED;
Query OK, 0 rows affected (0.00 sec)
ps:之前从库设置,没有效果,在主库做设置就生效了.
注意:命令行执行的话,重启后会无效,为了永久生效的话把配置加到配置.
[root@mysql-rtb-master ~]# cat /etc/my.cnf
[mysqld]
binlog_format=mixed
热重启:
[root@mysql-rtb-master ~]# /etc/init.d/mysqld reload
SUCCESS! Reloading service MySQL