广告
返回顶部
首页 > 资讯 > 数据库 >MGR自增序列参数设置步骤
  • 181
分享到

MGR自增序列参数设置步骤

2024-04-02 19:04:59 181人浏览 安东尼
摘要

一、官网说明When Group Replication is started on a server, the value of auto_increment_increment is changed t

一、官网说明
When Group Replication is started on a server, the value of auto_increment_increment is changed to the value of group_replication_auto_increment_increment, which defaults to 7, and the value of auto_increment_offset is changed to the server ID. The changes are reverted when Group Replication is stopped. These settings avoid the selection of duplicate auto-increment values for writes on group members, which causes rollback of transactions. The default auto increment value of 7 for Group Replication represents a balance between the number of usable values and the permitted maximum size of a replication group (9 members).

The changes are only made and reverted if auto_increment_increment and auto_increment_offset each have their default value of 1. If their values have already been modified from the default, Group Replication does not alter them. From MySQL 8.0, the system variables are also not modified when Group Replication is in single-primary mode, where only one server writes.

敲黑板,划重点,在Mysql8.0的版本中,组复制在单主模式下(只有一个写服务器),系统变量(自增序列参数)是不会自动修改的。这是新版本中增加的一段话,我也是在测试中发现了了这个问题,在官网中得到了证实。知识就是知识或者别人告诉你,或者你自己找答案,找答案的过程是很有意思的。

二、验证过程
1、系统默认参数
MGR自增序列参数设置步骤

2、自增序列表,自增是按照默认参数自增的,并没有修改
MGR自增序列参数设置步骤

三、建议
1、建议大家还是用MGR中的单主模式
2、要对你要修改的每一个参数了如指掌,不然就不要改动。
3、纸上得来终觉浅,多做测试和实验也要多分享。

您可能感兴趣的文档:

--结束END--

本文标题: MGR自增序列参数设置步骤

本文链接: https://www.lsjlt.com/news/35277.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作