关于css:slaveskiperrors

87次阅读

共计 1643 个字符,预计需要花费 5 分钟才能阅读完成。

–slave-skip-errors=[err_code1,err_code2, … | all | ddl_exist_errors]

Normally, replication stops when an error occurs on the replica, which gives you the opportunity to resolve the inconsistency in the data manually. This option causes the replication SQL thread to continue replication when a statement returns any of the errors listed in the option value.

失常状况下,当有 error 时复制会中断,给机会手动解决数据不统一的问题。slave-skip-errors 会使 sql 线程疏忽这些 error 持续复制。

Do not use this option unless you fully understand why you are getting errors. If there are no bugs in your replication setup and client programs, and no bugs in MySQL itself, an error that stops replication should never occur. Indiscriminate use of this option results in replicas becoming hopelessly out of synchrony with the source, with you hawww.pizei.comving no idea why this has occurred.

不要轻易应用此参数,除非你齐全理解为什么会报错。在复制配置,客户端没有谬误的状况下,Mysql 自身没有 bug 的状况下,复制是不会中断的。随便的应用此参数会导致主从不统一。

For error codes, you should use the numbers provided by the error message in the replica’s error log

and in the output of SHOW SLAVE STATUS. Appendix B, Error Messages and Common Problems, lists server error codes.

对于谬误 codes,能够通过 show slave status 的输入页游的信息进行查看。

The shorthand value ddl_exist_errors is equivalent to the error code list

1007,1008,1050,1051,1054,1060,1061,1068,1094,1146.

相面列出了较为常见的 ddl_exist_errors,1007,1008,1050,1051,1054,1060,1061,1068,1094,1146.

You can also (but should not) use the very nonrecommended value of all to cause the replica to ignore all error messages and keeps going regardless of what happens. Needless to say, if you use all, there are no guarantees regarding the integrity of your data. Please do not complain (or file bug reports) in this case if the replica’s data is not anywhere close to what it is on the source. You have been warned.

Examples:

–slave-skip-errors=1062,1053

–slave-skip-errors=all

–slave-skip-errors=ddl_exist_errors

正文完
 0