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. 【uoj#51】[UR #4]元旦三侠的游戏 博弈论+dp

    题目描述 给出 $n$ 和 $m$ ,$m$ 次询问.每次询问给出 $a$ 和 $b$ ,两人轮流选择:将 $a$ 加一或者将 $b$ 加一,但必须保证 $a^b\le n$ ,无法操作者输,问先手是 ...

  2. 洛谷 P2057 善意的投票(网络流最小割)

    P2057 善意的投票 题目描述 幼儿园里有n个小朋友打算通过投票来决定睡不睡午觉.对他们来说,这个问题并不是很重要,于是他们决定发扬谦让精神.虽然每个人都有自己的主见,但是为了照顾一下自己朋友的想法 ...

  3. TCP的拥塞控制 (二)

    TCP Reno TCP  Reno引入了ssthresh(Slow Start threshold)变量,作为TCP的Slow Start和Congestion Avoidance两个阶段的分界线. ...

  4. 【数组】- ArrayList自动扩容机制

    不同的JDK版本的扩容机制可能有差异 实验环境:JDK1.8 扩容机制: 当向ArrayList中添加元素的时候,ArrayList如果要满足新元素的存储超过ArrayList存储新元素前的存储能力, ...

  5. 【BZOJ1458】【洛谷4311】士兵占领(网络流)

    [BZOJ1458][洛谷4311]士兵占领(网络流) 题面 BZOJ权限题,洛谷真好 Description 有一个M * N的棋盘,有的格子是障碍.现在你要选择一些格子来放置一些士兵,一个格子里最 ...

  6. 谷哥的小弟学前端(01)——HTML常用标签(1)

    探索Android软键盘的疑难杂症 深入探讨Android异步精髓Handler 详解Android主流框架不可或缺的基石 站在源码的肩膀上全解Scroller工作机制 Android多分辨率适配框架 ...

  7. vmware中ubuntu虚拟机扩容

    https://blog.csdn.net/ldzm_edu/article/details/78893721

  8. 音视频处理之H264编码标准20170906

    一. H264基础概念 1.名词解释 场和帧 :    视频的一场或一帧可用来产生一个编码图像.在电视中,为减少大面积闪烁现象,把一帧分成两个隔行的场. 片:             每个图象中,若干 ...

  9. WPF系列之三:实现类型安全的INotifyPropertyChanged接口,可以不用“Magic string” 么?

    通常实现INotifyPropertyChanged接口很简单,为你的类只实现一个PropertyChanged 的Event就可以了. 例如实现一个简单的ViewModel1类: public cl ...

  10. CCPC2018-A-Buy and Resell

    Problem Description The Power Cube is used as a stash of Exotic Power. There are n cities numbered 1 ...