zoukankan      html  css  js  c++  java
  • ERROR 1666 (HY000): Cannot execute statement: impossible to write to binary log since statement is in row format and BINLOG_FORMAT = STATEMENT.

    centos7.5 binlog恢复数据失败

    问题:

    mysql> . /tmp/inc.sql
    ERROR 1050 (42S01): Table 'new_1' already exists
    ERROR 1666 (HY000): Cannot execute statement: impossible to write to binary log since statement is in row format and BINLOG_FORMAT = STATEMENT.
    

    原因:

    新库用的binlog是statement模式,导入的是row模式的binlog
    

    解决方法:

    设置新库的binlog模式为row
    [root@db01-51 ~]# vim /data/3307/my.cnf
    [mysqld]
    log-bin=mysql-bin
    binlog_format=row
    重启新数据库,再次导入就没有问题
  • 相关阅读:
    每日总结
    每日总结
    每日总结
    10.30
    10.29
    10.28
    10.27
    10.26
    10.25
    10.24
  • 原文地址:https://www.cnblogs.com/lvhanzhi/p/10615514.html
Copyright © 2011-2022 走看看