# The slave cann't be working because of the binlog\_format=statement

**URL:** <https://forums.percona.com/t/the-slave-cannt-be-working-because-of-the-binlog-format-statement/3346>\
**Category:** Other MySQL® Questions\
**Created:** [March 19, 2014, 3:53am UTC](https://forums.percona.com/t/the-slave-cannt-be-working-because-of-the-binlog-format-statement/3346 "2014-03-19T03:53:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Coca\_Li](https://avatars.discourse-cdn.com/v4/letter/c/858c86/32.png) [@Coca\_Li](https://forums.percona.com/u/Coca_Li)\
**Post date:** [March 19, 2014, 3:53am UTC](https://forums.percona.com/t/the-slave-cannt-be-working-because-of-the-binlog-format-statement/3346/1 "2014-03-19T03:53:17Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![niljoshi](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/niljoshi/32/16889_2.png) [@niljoshi](https://forums.percona.com/u/niljoshi)\
**Post date:** [March 31, 2014, 7:37am UTC](https://forums.percona.com/t/the-slave-cannt-be-working-because-of-the-binlog-format-statement/3346/2 "2014-03-31T07:37:14Z")

</div>

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.
