zoukankan      html  css  js  c++  java
  • 【转】[MySQL复制异常]Cannot execute statement: impossible to write to binary log since statement is in row for

    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

  • 相关阅读:
    122. Best Time to Buy and Sell Stock II
    121. Best Time to Buy and Sell Stock
    72. Edit Distance
    583. Delete Operation for Two Strings
    582. Kill Process
    indexDB基本用法
    浏览器的渲染原理
    js实现txt/excel文件下载
    git 常用命令
    nginx进入 配置目录时
  • 原文地址:https://www.cnblogs.com/eedc/p/9145122.html
Copyright © 2011-2022 走看看