show slave status \G
Last_SQL_Errno: 1032 Last_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 有了它,根據pos值,在主庫上直接就能找到,找到那條數據,反作(變成insert)mysql
/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;
知道是那條數據就好辦了, sql
我經過 Navicat for MySQL 把這個表導出,
選擇SQL腳本文件
勾選 ‘包含列的標題’
點擊‘開始’ 而後就能夠看到導出的sql文件位置
使用notepad++ 打開導出的sql文件
找到sql語句,在slave上插入,啓動slave。ide
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);