官方说明:

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

    (MySQL Cluster NDB 7.0.33 and later; MySQL Cluster NDB 7.1.22 and later:)--slave-skip-errors=[err_code1,err_code2,...|all|ddl_exist_errors]

    Command-Line Format --slave-skip-errors=name
    Option-File Format slave-skip-errors
    System Variable Name slave_skip_errors
    Variable Scope Global
    Dynamic Variable No
    Permitted Values (>= 5.1.61-ndb-7.0.33,5.1.61-ndb-7.1.22)
    Type string
    Default OFF
    Valid Values [list of error codes]
    all
    ddl_exist_errors

    Normally, replication stops when an error occurs on the slave. This gives you the 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 option value.

    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 slaves becoming hopelessly out of synchrony with the master, with you having no idea why this has occurred.

    Note

    Prior to MySQL 5.1.35, this option had no effect with row-based logging. (Bug #39393)

    For error codes, you should use the numbers provided by the error message in your slave error log and in the output of SHOW SLAVE STATUSAppendix C, Errors, Error Codes, and Common Problems, lists server error codes.

    You can also (but should not) use the very nonrecommended value of all to cause the slave 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 slave's data is not anywhere close to what it is on the master. You have been warned.

    For MySQL Cluster Replication in MySQL Cluster NDB 7.0 beginning with version 7.0.33 and MySQL Cluster NDB 7.1 beginning with version 7.1.22, an additional shorthand value ddl_exist_errors is supported for use with the enhanced failover mechanism which is implemented in that and later version of MySQL Cluster NDB 7.2. This value is equivalent to the error code list 1007,1008,1050,1051,1054,1060,1061,1068,1094,1146This value is not supported by the mysqld binary included with the MySQL Server 5.1 distribution. (Bug #11762277, Bug #54854) For more information, see Section 17.6.8, “Implementing Failover with MySQL Cluster Replication”.

    Examples:

    --slave-skip-errors=1062,1053
    --slave-skip-errors=all
    --slave-skip-errors=ddl_exist_errors
System variables used on replication slaves.  The following list describes system variables for controlling replication slave servers. They can be set at server startup and some of them can be changed at runtime usingSET. Server options used with replication slaves are listed earlier in this section.

如果从库主要用作主库的备份,那么就不应该使用这个启动参数。设置不当,很可能造成主从数据库的数据不同步。但是,如果从数据库仅仅是为了分担主数据库的查询压力,且对数据的完整性要求不是很严格,那么这个选项的确可以减轻数据库管理员维护从数据看的工作量。

MySQL --slave-skip-errors的更多相关文章

  1. canal mysql slave

    [mysqld] log-bin=mysql-bin #添加这一行就ok binlog-format=ROW #选择row模式 server_id=1 #配置mysql replaction需要定义, ...

  2. 处理一则MySQL Slave环境出现ERROR 1201 (HY000): Could not initialize master info structure的案例

    mysql> start slave; ERROR (HY000): Slave failed to initialize relay log info structure from the r ...

  3. Mysql slave 同步错误解决

    涉及知识点 mysql 主从同步 ,参考: MySQL数据库设置主从同步 mysqlbin log查看, 参考:MySQL的binlog日志 解决slave报错, 参考: Backup stopped ...

  4. 乌龙之MySQL slave IO status:connecting

    搭建了一个主从,状态一直如下: 检查错误日志报错如下: review搭建过程,语法并没有问题. 检查用户及网络,也没有问题: so?what is the cause ? 等等....貌似上面搭建用的 ...

  5. xtrabackup备份方式搭建一个mysql slave

    以前mysql搭建新备库都是在现在业务较小的备库上停止同步或停止数据库,然后拷贝数据库到新备库,配置好新备库后,再开启同步或数据库.然而,这次没有空闲备库用来搭新备库.需要从一个业务繁忙的数据库中搭建 ...

  6. 使用Percona Xtrabackup创建MySQL slave库

    一.使用Percona Xtrabackup创建MySQL slave库 MySQL Server 版本: Server version: 5.7.10-log MySQL Community Ser ...

  7. innobackupex 备份数据搭建 MySQL Slave

    简介: 数据量比较大时,使用 innobackupex 备份数据新增 MySQL Slave 节点. 安装 innobackupex 工具,我这里写过一次:http://www.cnblogs.com ...

  8. (转)使用参数SQL_SLAVE_SKIP_COUNTER处理mysql slave同步错误讨论

    使用参数SQL_SLAVE_SKIP_COUNTER处理mysql slave同步错误讨论 本文链接地址:http://blog.chinaunix.net/uid-31396856-id-57532 ...

  9. 普通用户Mysql 5.6.13 主从,主主及nagios的mysql slave监控

    Master:192.168.209.19 Slave:192.168.209.20 mysql版本:mysql5.6.13 1. 以root身份创建普通用户,如mysql,并创建mysql安装目录: ...

  10. mysql Slave 启动失败

    报错日志 Slave failed to initialize relay log info structure java程序访问日志显示事物查询失败,排查mysql 发现其中一台slave 启动状态 ...

随机推荐

  1. Adobe Edge Animate –Edge Commons强势来袭,Edge团队开发成为现实

    Adobe Edge Animate –Edge Commons强势来袭,Edge团队开发成为现实 版权声明: 本文版权属于 北京联友天下科技发展有限公司. 转载的时候请注明版权和原文地址. Edge ...

  2. VB.net 字符串 分割 及 重新倒序组装

    ''' <summary> ''' split with ">>>>" , and inverted order ''' </summar ...

  3. Ext.Slider的试用小记

    最近需要做一个滑动条,动态改变地图动画播放的速度.实在没有自己用js写一个的那个水平,于是找到了Ext.Slider,ExtJS的版本是3.3.0. new Ext.Slider({ id: 'pla ...

  4. vsftp实现ftps加密传输数据

    FTP明文传输数据,不太安全,ftp+ssl可以实现传输加密=ftps 01.创建FTP用户 user -d /ftp_www  -s /sbin/nologin mvpbang echo " ...

  5. sendkeys用法详解

    将一个或多个按键消息发送到活动窗口,就如同在键盘上进行输入一样. 语法 SendKeys string[, wait] SendKeys 语句的语法具有以下几个命名参数: 部分 描述   string ...

  6. javascript事件学习笔记

    事件冒泡 并不是所有的事件都支持事件冒泡,比如submit ,focus,blur不支持事件冒泡,mouseover,mouseout虽然支持冒泡,但是一般不用,因为需要经常计算元素的位置,消耗比较大 ...

  7. javascript深入理解闭包

    一.变量的作用域 要理解闭包,首先必须理解Javascript特殊的变量作用域. 变量的作用域无非就是两种:全局变量和局部变量. Javascript语言的特殊之处,就在于函数内部可以直接读取全局变量 ...

  8. 在 Tomcat 中设置 JDBCRealm

    除了默认配置的 DataSourceRealm,Tomcat 还支持 JDBCRealm,它通过 JDBC 来访问记录在关系数据库里的认证信息. JDBCRealm 的配置步骤如下: 在 $TOMCA ...

  9. 海量小文件存储与Ceph实践

    海量小文件存储(简称LOSF,lots of small files)出现后,就一直是业界的难题,众多博文(如[1])对此问题进行了阐述与分析,许多互联网公司也针对自己的具体场景研发了自己的存储方案( ...

  10. 我是如何自学Android,资料分享

       我是如何自学Android,资料分享(2015 版) 已经完成,我的建议是先把这一篇看完,再看2015 版的.关于我在学习中开发的项目代码,已经发布在: 爱开发-源码搜索,集成了上万个App源码 ...