开启binlog后异常:impossible to write to binary log since BINLOG_FORMAT = STATEMENT
来源:互联网 发布:安卓温度报警器源码 编辑:程序博客网 时间:2024/05/22 01:26
问题
在实现数据库主备同步的时候,owncloud出现了异常。
General error: 1665 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.
解释
这是因为,mysql默认的binlog_format是STATEMENT。
从 MySQL 5.1.12 开始,可以用以下三种模式来实现:基于SQL语句的复制(statement-based replication, SBR),基于行的复制(row-based replication, RBR),混合模式复制(mixed-based replication, MBR)。相应地,binlog的格式也有三种:STATEMENT,ROW,MIXED。
如果你采用默认隔离级别REPEATABLE-READ,那么建议binlog_format=ROW。如果你是READ-COMMITTED隔离级别,binlog_format=MIXED和binlog_format=ROW效果是一样的,binlog记录的格式都是ROW,对主从复制来说是很安全的参数。
解决方案
方法一
mysql> STOP SLAVE;Query OK, 0 rows affected (0.02 sec) mysql> SET GLOBAL binlog_format=ROW;Query OK, 0 rows affected (0.00 sec) mysql> START SLAVE;Query OK, 0 rows affected (0.00 sec)
但是这样只是一次性的,重启后失效。
方案二
永久生效,需要修改my.ini
# binary logging format - ROWbinlog_format=ROW
参考资料:
网上资源
备注:
转载请注明出处:http://blog.csdn.net/wsyw126/article/details/73011497
作者:WSYW126
- 开启binlog后异常:impossible to write to binary log since BINLOG_FORMAT = STATEMENT
- impossible to write to binary log since statement is in row format and BINLOG_FORMAT = STATEMENT
- Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT = STATEMENT…
- ERROR 1665 (HY000): Cannot execute statement: impossible to write to binary log since BINLOG_FORMAT
- [MySQL复制异常]Cannot execute statement: impossible to write to binary log since statement is in row for
- [MySQL复制异常]Cannot execute statement: impossible to write to binary log since statement is in row for
- Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. S
- Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.
- Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. S
- Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.
- Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT.
- ActiveMQ中使用mysql做持久化报错:Cannot execute statement: impossible to write to binary log since BINLOG_FORM
- ActiveMQ中使用mysql做持久化报错:Cannot execute statement: impossible to write to binary log since BINLOG_FORM
- JMS之—— ActiveMQ中使用mysql做持久化报错:Cannot execute statement: impossible to write to binary log since BINL
- Last_Error: Error executing row event: 'Cannot execute statement: impossible to write to binary log
- Cause: java.sql.SQLException: Cannot execute statement: impossible to write to binary log
- [Warning] Unsafe statement written to the binary log using statement format since 错误
- error code 1592 Unsafe statement written to the binary log using statement...
- MinGW64\lib32路径不存在问题
- python自学开发工具安装(二)
- MySql数据库优化注意的四个细节
- Gradle相关的配置文件
- java中的锁
- 开启binlog后异常:impossible to write to binary log since BINLOG_FORMAT = STATEMENT
- Java虚拟机学习笔记(1)Windows下编译OpenJDK8
- node.js npm安装
- Android 发送和接收定制广播
- NoScrollViewPager解决嵌套listView依然可以滑动的问题
- Android平台HttpGet、HttpPost请求实例
- Android中添加syslog功能
- 在eclipse中添加tomcat
- myeclipse10.7导出war包时出错解决办法(转)