MGR Muti-Primary 切换 single_primary 模式

原因:因为希望做ProxySQL+MGR之间Proxy层的消耗测试,需要把原有的MGR多主改为单主模式.

  • 修改MGRgroup_replication_single_primary_mode参数为ON
root@localhost [(none)]>show global variables like '%group_replication_single_primary_mode%' ;
+---------------------------------------+-------+
| Variable_name | Value |
+---------------------------------------+-------+
| group_replication_single_primary_mode | OFF |
+---------------------------------------+-------+
1 row in set (0.01 sec) root@localhost [(none)]>set global group_replication_single_primary_mode=ON;
ERROR 3093 (HY000): Cannot change into or from single primary mode while Group Replication is running.
  • 提示不能在running下进行.只能把集群停下来:

    每个节点执行(注意记住最后的退出的节点):
root@localhost [(none)]>stop group_replication;
Query OK, 0 rows affected (9.26 sec)
关闭节点后执行:
set global group_replication_single_primary_mode=ON;
ERROR 1231 (42000): Cannot turn ON single_primary_mode while enforce_update_everywhere_checks is enabled.
执行:
set global group_replication_enforce_update_everywhere_checks = OFF;
set global group_replication_single_primary_mode=ON;
Query OK, 0 rows affected (0.00 sec)
再一次启动第一个MGR节点:
set global group_replication_bootstrap_group=on;
start group_replication;
其它节点启动:
set global group_replication_bootstrap_group=off;
set global group_replication_enforce_update_everywhere_checks = OFF;
set global group_replication_single_primary_mode=ON;
start group_replication; 一定要执行第2条,否则会报配置不兼容错误:
ERROR] Plugin group_replication reported: 'The member configuration is not compatible with the group configuration. Variables such as single_primary_mode or enforce_update_everywhere_checks must have the same value on every server in the group. (member configuration option: [group_replication_enforce_update_everywhere_checks], group configuration option: [group_replication_single_primary_mode]).'

MGR Switch Muti-Primary to single_primary的更多相关文章

  1. MGR Switch single-Primary to Muti_primary

    MGR single_primary 切换 Muti-Primary 模式 root@localhost [(none)]>select * from performance_schema.re ...

  2. Oracle PL/SQL 编程手册(SQL大全)

    一.SQLPLUS 1引言 SQL命令 以下17个是作为语句开头的关键字: alterdroprevoke auditgrantrollback* commit*inse ...

  3. 配置STP、RSTP以及负载均衡

    生成树协议是一种二层管理协议,它通过有选择性地阻塞网络冗余链路来达到消除网络二层环路的目的,同时具备链路的备份功能. 每个VLAN都生成一棵树是一种比较直接,而且最简单的解决方法.它能够保证每一个VL ...

  4. 数据库之mysql练习

    建表 部门表 #DROP IF EXISTS TABLE DEPT; CREATE TABLE DEPT( DEPTNO int PRIMARY KEY,##部门编号 DNAME VARCHAR(14 ...

  5. drbd 配置

    DRBD(Distributed Replicated Block Device),DRBD 号称是 "网络 RAID",开源软件,由 LINBIT 公司开发.DRBD实际上是一种 ...

  6. ProxySQL+MGR实现读写分离和主节点故障无感知切换 - 完整操作记录

    前面的文章介绍了ProxySQL用法,这里说下ProxySQL中间件针对Mysql组复制模式实现读写分离以及主节点故障时能够自动切换到新的主节点,而应用对此过程无感知的功能.Mysql组复制(MGR) ...

  7. 从源码分析 MGR 的流控机制

    Group Replication 是一种 Shared-Nothing 的架构,每个节点都会保留一份数据. 虽然支持多点写入,但实际上系统的吞吐量是由处理能力最弱的那个节点决定的. 如果各个节点的处 ...

  8. Partition:分区切换(Switch)

    在SQL Server中,对超级大表做数据归档,使用select和delete命令是十分耗费CPU时间和Disk空间的,SQL Server必须记录相应数量的事务日志,而使用switch操作归档分区表 ...

  9. Partitioning & Archiving tables in SQL Server (Part 2: Split, Merge and Switch partitions)

    Reference: http://blogs.msdn.com/b/felixmar/archive/2011/08/29/partitioning-amp-archiving-tables-in- ...

随机推荐

  1. Struts的xml包必须继承Struts-default 不然不能使用拦截器与返回类型的功能

    Struts的xml包必须继承Struts-default 不然不能使用拦截器与返回类型的功能

  2. el表达式作用域查找顺序 注意:当属性名字相同时候 先找到是小的作用域 因为是从小到大开始找的

  3. bzoj2699 更新

    题意 对于一个数列A[1..N],一种寻找最大值的方法是:依次枚举A[2]到A[N],如果A[i]比当前的A[1]值要大,那么就令A[1]=A[i],最后A[1]为所求最大值.假设所有数都在范围[1, ...

  4. C++解析(23):多态与C++对象模型

    0.目录 1.多态 2.C++对象模型 2.1 使用C语言实现封装 3.继承对象模型 4.多态对象模型 4.1 使用C语言实现多态 5.小结 1.多态 面向对象中期望的行为: 根据实际的对象类型判断如 ...

  5. Linux基础------文件打包解包---tar命令,文件压缩解压---命令gzip,vim编辑器创建和编辑正文件,磁盘分区/格式化,软/硬链接

    作业一:1) 将用户信息数据库文件和组信息数据库文件纵向合并为一个文件/1.txt(覆盖) cat /etc/passwd /etc/group > /1.txt2) 将用户信息数据库文件和用户 ...

  6. PID控制算法的C语言实现一 PID算法原理

    本系列是转载............. 全部的程序有一个共同点:就是我没认真去调pid的参数 在工业应用中PID及其衍生算法是应用最广泛的算法之一,是当之无愧的万能算法,如果能够熟练掌握PID算法的设 ...

  7. C++时间

    C++时间 头文件 chrono, 命名空间 std. 现在时间 std::chrono::system_clock::now() 返回系统时钟的当前时间 时钟 std::chrono::system ...

  8. 「Linux」centos7安装python

    •安装python3.6可能使用的依赖 yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqli ...

  9. python 获取文件md5

    def GetFileMd5(filename): if not os.path.isfile(filename): return myhash = hashlib.md5() f = file(fi ...

  10. php实现多继承-trait语法

    自 PHP 5.4.0 起,PHP 实现了一种代码复用的方法,称为 trait. Trait 是为类似 PHP 的单继承语言而准备的一种代码复用机制.Trait 为了减少单继承语言的限制,使开发人员能 ...