MySQL Error last_sql_errno:1032

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.