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
重启新数据库,再次导入就没有问题

相关文章:

  • 2021-06-17
  • 2022-12-23
  • 2021-10-09
  • 2021-10-19
  • 2021-08-11
  • 2021-05-20
  • 2022-12-23
  • 2022-01-08
猜你喜欢
  • 2022-12-23
  • 2021-08-29
  • 2021-09-20
  • 2021-06-09
  • 2022-12-23
  • 2022-12-23
  • 2022-02-06
相关资源
相似解决方案