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. MySQL复制 -- Binlog (1)

    复制之所以工作得益于MySQL把对数据库的变更都记录在 binlog中,然后主库把它读出来,放到从库上去应用.当然binlog 的用途不仅限于此,比如 PITR等 在5.1.4版本以前,binlog格 ...

  2. 【Java】JDBCUtil模板

    package jdbc; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; ...

  3. C++解析(6):函数参数的扩展

    0.目录 1.函数参数的默认值 2.函数默认参数的规则 3.函数占位参数 4.小结 1.函数参数的默认值 C++可以在函数声明时为参数提供一个默认值 当函数调用时没有提供参数的值,则使用默认值 参数的 ...

  4. OEM SLP Key

    OEM SLP Key Windows Server 2012 R2 Datacenter ===================== 2N9T6-Y284D-T68G9-QGV6X-FRFTD -- ...

  5. Codeforces711

    A ZS the Coder and Chris the Baboon are travelling to Udayland! To get there, they have to get on th ...

  6. Unity3D手游开发日记(1) - 移动平台实时阴影方案

    阴影这个东西,说来就话长了,很多年前人们就开始研究出各种阴影技术,但都存在各种瑕疵和问题,直到近几年出现了PSSM,也就是CE3的CSM,阴影技术才算有个比较完美的解决方案.Unity自带的实时阴影, ...

  7. NAT网络地址转换模拟过程

    原理图,如图1 图1 以下为配置NAT网络地址转换的实验: eNSP模拟图,如图2 图2 Step1.给路由器的每个接口赋予一个地址,如图3,图4 图3 图4 AR1和AR2中添加路由表项,如图5,图 ...

  8. bzoj3143: [Hnoi2013]游走(贪心+高斯消元)

    考虑让总期望最小,那么就是期望经过次数越多的边贪心地给它越小的编号. 怎么求每条边的期望经过次数呢?边不大好算,我们考虑计算每个点的期望经过次数f[x],那么一条边的期望经过次数就是f[x]/d[x] ...

  9. 框架----Django框架知识点整理

    一.cbv cbv(class-base-view) 基于类的视图 fbv(func-base-view) 基于函数的视图 a.基本演示 urlpatterns = [ url(r'^login.ht ...

  10. [转]从头开始 GAN

    1 前言 GAN的火爆想必大家都很清楚了,各种GAN像雨后春笋一样冒出来,大家也都可以名正言顺的说脏话了[微笑脸].虽然目前GAN的酷炫应用还集中在图像生成上,但是GAN也已经拓展到NLP,Robot ...