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. 实现对一个8bit数据的指定位的置0或者置1操作,并保持其他位不变。

    给定函数原型:void bit_set(unsigned char *p_data,unsigned char positin,int flag) 参数说明:p_data是指定的源数据:positio ...

  2. P3629 [APIO2010]巡逻

    题目描述 在一个地区中有 n 个村庄,编号为 1, 2, ..., n.有 n – 1 条道路连接着这些村 庄,每条道路刚好连接两个村庄,从任何一个村庄,都可以通过这些道路到达其 他任一个村庄.每条道 ...

  3. The Necklace UVA - 10054(欧拉回路)

    题目分析:1.无向图欧拉回路是否连通2.所有点的度为偶数.并查集+degree 这题题目保证了是联通的  所以就不用判断是否联通了 #include <iostream> #include ...

  4. LiveCD及Casper调研

    1.LiveCD原理 LiveCD本质上是ISO 9660/El Torito格式的CD-ROM. 下面对LiveCD涉及的各种技术做了简单的调研. 1.1. CD-ROM CD-ROM是一种光盘存储 ...

  5. Java 工作2年后需要达到怎么样的技术水平

    有人回答说这只能是大企业或者互联网企业的工程师才能拿到.也许是的,小公司或者非互联网企业拿两万的不太可能是码农了,应该是已经转管理后才有可能.还有区域问题,这个不在我的考虑范围内,因为除了北上广深杭, ...

  6. Shell颜色及显示git分支配置

    # Ubuntu终端下命令行颜色配置 ## Parses out the branch name from .git/HEAD: find_git_branch () { local dir=. he ...

  7. 保护程序猿滴眼睛---修改VS 2012 编辑器颜色

    转载于http://blog.csdn.net/qing666888/article/details/8973216 字体,发现好多人选用 Consolas  ...确实挺好看的. 然后 修改背景色: ...

  8. C++ STL 一般总结(转载)

    注:原博地址:http://www.cnblogs.com/biyeymyhjob/archive/2012/07/22/2603525.html 以下内容来源网上 经过整合而成 一.一般介绍 STL ...

  9. ECONNRESET和WSAECONNRESET怎么产生的以及如何避免

    ECONNRESET是linux环境网络编程产生的错误,错误码为104, WSAECONNRESET是windows环境网络编程产生的错误,错误码为10054 两者产生的原因都一样,分以下几种情况: ...

  10. python入门篇之介绍和流程控制(一)

    Python入门 一.第一句python代码 很多语言的第一句python代码都是以“你好,世界”开始的,那么我们的python也是如此. 在 /home/dev/ 目录下创建 hello.py 文件 ...