This morning my slave stopped working..

Slave_IO_State: Waiting for master to send event
Slave_IO_Running: Yes
Slave_SQL_Running: No

Last_SQL_Error: Could not execute Update_rows event on table dynaccount.account; Can't find record in 'account', Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event's master log mysql-bin.000025, end_log_pos 802331975

Restoring slave

- Master
# mysqldump -u root -pxxx --single-transaction --hex-blob --routines --triggers --events --quick --add-drop-database --extended-insert --databases my_db | gzip > /root/dump.sql.gz
# scp -o 'StrictHostKeyChecking no' /root/dump.sql.gz [email protected]:/root

- Slave
# mysql -u root_slave -pxxx -e "stop slave; reset master"

# pv /root/dump.sql.gz | gunzip | mysql -u root_slave -pxxx
# mysql -u root_slave -pxxx -e "start slave"
# mysql -u root_slave -pxxx -e "show slave status\G"

After restoring the slave I keep getting the same error?!

1 Answer 1


Add --master-data to the mysqldump. That way the change of slave position to where you did the mysqldump gets executed when you load it.

  • you saved my day :P
    – clarkk
    Commented Oct 25, 2018 at 9:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.