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 ofall
To 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