GET 24/7 LIVE HELP NOW

Announcement

Announcement Module
Collapse
No announcement yet.

The slave cann't be working because of the binlog_format=statement

Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • The slave cann't be working because of the binlog_format=statement

    In the master node, it reported
    Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. The statement is unsafe because it uses a LIMIT clause.
    I reset this variables binlog_format=mixed to reslove this problem.
    But in the slave node, the slave thread couldn't be started, it reported
    [ERROR] Slave SQL: The incident LOST_EVENTS occured on the master. Message: error writing to the binary log, Error_code: 1590
    [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with "SLAVE START". We stopped at log 'mysql-bin.000036' position 371197684

    I try to restart the slave thread in the slave node, but it doesn't work.
    mysql> show slave status\G;
    *************************** 1. row ***************************
    Slave_IO_State: Waiting for master to send event
    Master_Host: 172.16.12.15
    Master_User: reply
    Master_Port: 3306
    Connect_Retry: 60
    Master_Log_File: mysql-bin.000040
    Read_Master_Log_Pos: 1577830
    Relay_Log_File: mysqld-relay-bin.000011
    Relay_Log_Pos: 283
    Relay_Master_Log_File: mysql-bin.000036
    Slave_IO_Running: Yes
    Slave_SQL_Running: No
    Replicate_Do_DB:
    Replicate_Ignore_DB: information_schema
    Replicate_Do_Table:
    Replicate_Ignore_Table:
    Replicate_Wild_Do_Table:
    Replicate_Wild_Ignore_Table:
    Last_Errno: 1590
    Last_Error: The incident LOST_EVENTS occured on the master. Message: error writing to the binary log
    Skip_Counter: 0
    Exec_Master_Log_Pos: 371197684
    Relay_Log_Space: 3026678
    Until_Condition: None
    Until_Log_File:
    Until_Log_Pos: 0
    Master_SSL_Allowed: No
    Master_SSL_CA_File:
    Master_SSL_CA_Path:
    Master_SSL_Cert:
    Master_SSL_Cipher:
    Master_SSL_Key:
    Seconds_Behind_Master: NULL
    Master_SSL_Verify_Server_Cert: No
    Last_IO_Errno: 0
    Last_IO_Error:
    Last_SQL_Errno: 1590
    Last_SQL_Error: The incident LOST_EVENTS occured on the master. Message: error writing to the binary log
    Replicate_Ignore_Server_Ids:
    Master_Server_Id: 11
    Master_UUID: eefc1d8a-a551-11e3-b8e1-90e2ba238904
    Master_Info_File: /rtbapp/mysql/data/master.info
    SQL_Delay: 0
    SQL_Remaining_Delay: NULL
    Slave_SQL_Running_State:
    Master_Retry_Count: 86400
    Master_Bind:
    Last_IO_Error_Timestamp:
    Last_SQL_Error_Timestamp: 140319 15:38:02
    Master_SSL_Crl:
    Master_SSL_Crlpath:
    Retrieved_Gtid_Set:
    Executed_Gtid_Set:
    Auto_Position: 0
    1 row in set (0.00 sec)

    How can I repair my slave? Thanks a lot.

  • #2
    Hi,

    is it possible for you to stop slave, "FLUSH LOGS" on master and start slave with new master file and position details?
    I hope it will keep consistent your master and slave servers. so after that I would suggest to run pt-table-checksum utility for database consistency.

    Comment

    Working...
    X