MySQL Error last_sql_errno:1032
show slave status \G
Last_SQL_Errno: 1032Last_SQL_Error: Could not execute Update_rows event on table 35lq_db.dr_planstats_h; Can‘t find record in ‘dr_planstats_h‘, Error_code: 1032; handler error HA_ERR_KEY_NOT_FOUND; the event‘s master log mysql-bin.000010, end_log_pos 317865
End_log_pos has it, according to the POS value, can be found directly on the main library, find the data, reverse (into insert)
/usr/local/mysql/bin/mysqlbinlog -v --base64-output=DECODE-ROWS /data/mysql/binlog/mysql-bin.000010 | grep -A ‘10‘ 317865
mysql> select * from 35lq_db.dr_planstats_h where id=39222;
It's good to know it's the data.
I exported this table through Navicat for MySQL,
Select SQL Script File
Tick ' include column headings '
Click ' Start ' and you'll see the location of the exported SQL file
Open an exported SQL file using notepad++
Locate the SQL statement, insert it on slave, and start the slave.
Open an exported SQL file using notepad++
INSERT INTO `dr_planstats_h` (`id`, `day`, `hours`, `uid`, `planid`, `money`, `adstypeid`, `ipnums`, `views`, `clicks`) VALUES (39222, ‘2018-7-18‘, 11, 35, 65, 651.5340, 2, 0, 0, 0);
MySQL Error last_sql_errno:1032