您的位置:首页 > 数据库 > MySQL

[MySQL复制异常]Cannot execute statement: impossible to write to binary log since statement is in row for

2015-12-03 15:17 603 查看
转自:http://blog.csdn.net/ldl22847/article/details/50110019

MySQL复制错误]Last_Errno: 1666 Last_Error: Error executing row event: 'Cannot execute statement: imposs

收到email报警, Last_Error: Error executing row event: 'Cannot execute statement: impossible to write to binary log since statement is in row format and BINLOG_FORMAT = STATEMENT.'

mysql> show slave status;

 

看到貌似是statement模式不足以应付应用,换成mixed试试看吧:

mysql> STOP SLAVE;

Query OK, 0 rows affected (0.02 sec)

 mysql>  SET GLOBAL binlog_format=MIXED;

Query OK, 0 rows affected (0.00 sec)

 mysql> START SLAVE;

Query OK, 0 rows affected (0.00 sec)

 

但是这样只会一次性

为了永久生效,需要修改my.ini

# Remove leading

# to turn on a very important data integrity option: logging

# changes to the binary log between backups.

log_bin = E:/mysql56/log_bin/log_bin.log

#relay_log = E:/mysql56/log_bin/relay_log.log

#read_only = 1

# binary logging format - mixed recommended

binlog_format=mixed

my.ini 的地址一般存放在

C:\ProgramData\MySQL 一般是隐藏的。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: