MySQL Sync error

Source: Internet
Author: User
Tags variable scope

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/58/41/wKioL1StALGifQ6TAAKMao9u7Os545.jpg "title=" Untitled. png "alt=" wkiol1stalgifq6taakmao9u7os545.jpg "/>

Received the mail today MySQL from the library synchronization error, and later with the development of communication to say yes, the test to the time from Coorey inserted data, and later deleted, thought will not affect the main library, and then this program to the main library to insert data when reported this error,

Find a solution online:

Modify the MySQL configuration file/etc/my.cnf under [mysqld] Add a line slave_skip_errors = 1062, save. Restart MySQL. MySQL slave can be synchronized normally.

This does not guarantee the integrity of the data


See:Replication Slave Options and Variables

--slave-skip-errors=[err_code1,err_code2,...|all]

Command-Line Format
System Variable Name
Variable Scope global
Dynamic Variable no
Permitted Values Type
Default
Valid Values
[list of error codes]
all

Normally, replication stops when a error occurs on the slave. This gives your opportunity to resolve the inconsistency in the data manually. This option tells the slave SQL thread to continue replication when a statement returns any of the errors listed in the OP tion value.

Don't use the This option unless you fully understand why is getting errors. If There is no bugs in your replication setup and client programs, and no bugs in MySQL itself, a error that stops Repli cation should never occur. Indiscriminate use of this option results in slaves becoming hopelessly out of synchrony with the master No idea why this has occurred.

For error codes, you should use the numbers provided by the error message in your slave error log and in the output of . Appendix B, Errors, Error Codes, and Common problems, lists server error Codes.

You can also (but should not) use the very nonrecommended value ofallTo cause the slave to ignore all error messages and keeps going regardless of what happens. Needless to say, if-useall, there is no guarantees regarding the integrity of your data. Please don't complain (or file bug reports) In this case if the slave's data is not anywhere close to what it was on the M Aster.You have been warned.

Examples:

--slave-skip-errors=1062,1053--slave-skip-errors=all


This article is from the "Stone" blog, please be sure to keep this source http://dodowolf.blog.51cto.com/793581/1600327

MySQL Sync error

Related Article

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.