MySQL --slave-skip-errors
官方说明:
--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.
NotePrior 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 STATUS
. Appendix 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 useall
, 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 list1007,1008,1050,1051,1054,1060,1061,1068,1094,1146
. This 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的更多相关文章
- canal mysql slave
[mysqld] log-bin=mysql-bin #添加这一行就ok binlog-format=ROW #选择row模式 server_id=1 #配置mysql replaction需要定义, ...
- 处理一则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 ...
- Mysql slave 同步错误解决
涉及知识点 mysql 主从同步 ,参考: MySQL数据库设置主从同步 mysqlbin log查看, 参考:MySQL的binlog日志 解决slave报错, 参考: Backup stopped ...
- 乌龙之MySQL slave IO status:connecting
搭建了一个主从,状态一直如下: 检查错误日志报错如下: review搭建过程,语法并没有问题. 检查用户及网络,也没有问题: so?what is the cause ? 等等....貌似上面搭建用的 ...
- xtrabackup备份方式搭建一个mysql slave
以前mysql搭建新备库都是在现在业务较小的备库上停止同步或停止数据库,然后拷贝数据库到新备库,配置好新备库后,再开启同步或数据库.然而,这次没有空闲备库用来搭新备库.需要从一个业务繁忙的数据库中搭建 ...
- 使用Percona Xtrabackup创建MySQL slave库
一.使用Percona Xtrabackup创建MySQL slave库 MySQL Server 版本: Server version: 5.7.10-log MySQL Community Ser ...
- innobackupex 备份数据搭建 MySQL Slave
简介: 数据量比较大时,使用 innobackupex 备份数据新增 MySQL Slave 节点. 安装 innobackupex 工具,我这里写过一次:http://www.cnblogs.com ...
- (转)使用参数SQL_SLAVE_SKIP_COUNTER处理mysql slave同步错误讨论
使用参数SQL_SLAVE_SKIP_COUNTER处理mysql slave同步错误讨论 本文链接地址:http://blog.chinaunix.net/uid-31396856-id-57532 ...
- 普通用户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安装目录: ...
- mysql Slave 启动失败
报错日志 Slave failed to initialize relay log info structure java程序访问日志显示事物查询失败,排查mysql 发现其中一台slave 启动状态 ...
随机推荐
- python(2)-字符串(2)
字符串格式化: 前面说过一种字符串格式化方法,来复习一下: >>> print('His name is %s', 'jeff') His name is %s jeff 其实格式化 ...
- shell(1)
bash变量类别: 本地变量 : 又叫局部变量,仅对当前shell进程有效 环境变量 : 当前shell及其子shell,子子shell-. 特殊变量 : $? 上一个命令执行的状态,0表示执行成功 ...
- [改善Java代码]适时选择不同的线程池来实现
Java的线程池实现从最根本上来说只有两个:ThreadPoolExecutor类和ScheduledThreadPoolExecutor类,这两个类还是父子关系,但是Java为了简化并行计算,还提供 ...
- Redux你的Angular 2应用--ngRx使用体验
Angular2和Rx的相关知识可以看我的Angular 2.0 从0到1系列第一节:Angular 2.0 从0到1 (一)第二节:Angular 2.0 从0到1 (二)第三节:Angular 2 ...
- Jersey(1.19.1) - Building Responses
Sometimes it is necessary to return additional information in response to a HTTP request. Such infor ...
- 转:SqlServer2008误操作数据(delete或者update)后恢复数据
Sqlserver2008误操作数据(delete或者update)后恢复数据(转) 实际工作中,有时会直接在数据库中操作数据,比如对数据进行delete或者update操作,当进行这些操作的时候,如 ...
- Javascript之三种按钮点击事件
学习Javascript必须要先掌握基本的事件方法和语法,这些都是我们学过的也是最基本的.以前忘了总结,所以现在回顾,综合地总结一下,温故而知新. Javascript有三种按钮点击事件,分别为ale ...
- Android之屏幕测试
MainActivity: package com.example.touchscreentest; import android.os.Bundle; import android.R.layout ...
- Python基础-简单输出
很好的一个博客地址:http://www.liaoxuefeng.com/wiki/0014316089557264a6b348958f449949df42a6d3a2e542c000/0014316 ...
- 自己封装的SqlHelper
using System; using System.Collections.Generic; using System.Configuration; using System.Data; using ...