MySQL复制环境中使用slave_exec_mod参数
2014-05-07 10:50
549 查看
http://blog.csdn.net/staricqxyz/article/details/18889143
先看下slave_exec_mod官方描述
Controls whether
is used in replication conflict resolution and error checking.
of duplicate-key and no-key-found errors.
This mode is needed for multi-master replication, circular replication, and some other special replication scenarios for MySQL Cluster Replication.
SLAVE@root@test 07:21:41>show variables like 'slave_exec_mode';
+-----------------+--------+
| Variable_name | Value |
+-----------------+--------+
| slave_exec_mode | STRICT |
+-----------------+--------+
1 row in set (0.00 sec)
SLAVE@root@test 07:21:42>
意思是说slave_exec_mod默认是STRICT可选值是IDEMPOTENT,在多主大型复制系统中建议使用IDEMPOTENT值,它避免duplicate-key 和 no-key-found等错误。这个参数是动态的,可以直接修改。
SLAVE@root@test 07:39:58>show variables like 'slave_exec_mode';
+-----------------+------------+
| Variable_name | Value |
+-----------------+------------+
| slave_exec_mode | IDEMPOTENT |
+-----------------+------------+
1 row in set (0.00 sec)
SLAVE@root@test 07:40:09>set global slave_exec_mode='strict';
Query OK, 0 rows affected (0.00 sec)
SLAVE@root@test 07:40:23>show variables like 'slave_exec_mode';
+-----------------+--------+
| Variable_name | Value |
+-----------------+--------+
| slave_exec_mode | STRICT |
+-----------------+--------+
1 row in set (0.00 sec)
SLAVE@root@test 07:40:24>set global slave_exec_mode='IDEMPOTENT';
Query OK, 0 rows affected (0.00 sec)
先看下slave_exec_mod官方描述
Command-Line Format | --slave-exec-mode=mode |
Option-File Format | slave_exec_mode |
System Variable Name | slave_exec_mode |
Variable Scope | Global |
Dynamic Variable | Yes |
Permitted Values | |
Type | enumeration |
Default | STRICT(ALL) |
Default | IDEMPOTENT(NDB) |
Valid Values | IDEMPOTENT |
STRICT |
IDEMPOTENTor
STRICTmode
is used in replication conflict resolution and error checking.
IDEMPOTENTmode causes suppression
of duplicate-key and no-key-found errors.
This mode is needed for multi-master replication, circular replication, and some other special replication scenarios for MySQL Cluster Replication.
SLAVE@root@test 07:21:41>show variables like 'slave_exec_mode';
+-----------------+--------+
| Variable_name | Value |
+-----------------+--------+
| slave_exec_mode | STRICT |
+-----------------+--------+
1 row in set (0.00 sec)
SLAVE@root@test 07:21:42>
意思是说slave_exec_mod默认是STRICT可选值是IDEMPOTENT,在多主大型复制系统中建议使用IDEMPOTENT值,它避免duplicate-key 和 no-key-found等错误。这个参数是动态的,可以直接修改。
SLAVE@root@test 07:39:58>show variables like 'slave_exec_mode';
+-----------------+------------+
| Variable_name | Value |
+-----------------+------------+
| slave_exec_mode | IDEMPOTENT |
+-----------------+------------+
1 row in set (0.00 sec)
SLAVE@root@test 07:40:09>set global slave_exec_mode='strict';
Query OK, 0 rows affected (0.00 sec)
SLAVE@root@test 07:40:23>show variables like 'slave_exec_mode';
+-----------------+--------+
| Variable_name | Value |
+-----------------+--------+
| slave_exec_mode | STRICT |
+-----------------+--------+
1 row in set (0.00 sec)
SLAVE@root@test 07:40:24>set global slave_exec_mode='IDEMPOTENT';
Query OK, 0 rows affected (0.00 sec)
相关文章推荐
- MySQL导入文件报错并且乱码
- MySQL压缩版windows下安装
- mysql乱码解决方案
- mysql学习01-用户工具-14-05-07
- MySQL Scale Out
- mysql主从复制
- MYSQL事务回滚的2个问题分析
- MYSQL中常用的强制性操作(例如强制索引)
- 关于删除MySQL Logs的问题记录
- 64位的win7系统安装mysql步骤
- MySql中文全文检索的一种实现方案
- MySQL的多行插入
- MYSQL中常用的强制性操作(例如强制索引)
- MYSQL事务回滚的2个问题分析
- mysql存储过程实现split示例
- mysql数据备份与恢复
- Mysql初始化root密码和允许远程访问
- mysql锁机制整理
- Mysql的常用用法
- ubuntu 离线包安装mysql