{{item.label}}

mgr是什么意思?

189****7375
mysql企业版
提问时间:2022-10-29 06:23:09
提示:以下回答均以本问题为中心,仅供参考;如需更多帮助,请咨询早鸽顾问。 去咨询
回答 | 共2个
程涛
程涛
从业7年
专利申请专利驳回复审发明专利申请
所在地区:洛阳市
咨询解答:250
咨询TA

MySQL Group Replication(下简称MGR)准确来说是官方推出的高知可用解决方案,基于原生复制技术,并以插件的方式提供。

1、使用前,关掉防火墙,包括 selinux,firewalld,或者 MySQL 企业版的firewall(如果用了企业版的话)2、两台机器:(4 台 MySQL 实例)192.168.2.219 centos-ytt57-1 3311/3312192.168.2.229 centos-ytt57-2 3311/33123、安装 MySQL(两台都装), MySQL Shell(任意一台), mysqlrouter(任意一台,官方建议和应用程序装在一个服务器上)yum install mysql-community-server mysql-shell mysql-router-community

4、搭建 InnoDB-Cluster(两台都装)

1. 配置文件如下:shell>vi /etc/my.cnfmaster-info-repository=tablerelay-log-info-repository=tablegtid_mode=ONenforce_gtid_consistency=ONbinlog_checksum=NONElog_slave_updates=ONbinlog_format=ROWtransaction_write_set_extraction=XXHASH642. 系统 HOSTS 配置(两台都配)

shell>vi /etc/hosts

127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4

::1 localhost localhost.localdomain localhost6 localhost6.localdomain6

192.168.2.219 centos-ytt57-2

192.168.2.229 centos-ytt57-3

用 MySQL coalesce 函数确认下 report-host 是否设置正确(root@localhost) : [(none)] >SELECT coalesce(@@report_host, @@hostname) as r;+----------------+| r |+----------------+| centos-ytt57-1 |+----------------+1 row in set (0.00 sec)

3. 创建管理员用户搭建 GROUP REPLICATION (四个节点都要)

create user root identified by "Root@123";grant all on *.* to root with grant option;flush privileges;

4. MySQLsh 连接其中一台节点:

[root@centos-ytt57-1 mysql]# mysqlsh root@localhost:3321

5. 检查配置正确性:(如果这里不显示 OK,把对应的参数加到配置文件重启 MySQL 再次检查)dba.checkInstanceConfiguration("root@centos-ytt57-2:3311");dba.checkInstanceConfiguration("root@centos-ytt57-2:3312");dba.checkInstanceConfiguration("root@centos-ytt57-3:3311");dba.checkInstanceConfiguration("root@centos-ytt57-3:3312");mysqlsh 执行检测

[root@centos-ytt57-1 mysql]# mysqlsh --log-level=8 root@localhost:3311

MySQL localhost:3311 ssl JS > dba.checkInstanceConfiguration("root@centos-ytt57-2:3311")

{

"status": "ok"

}

6. 创建集群,节点 1 上创建。(结果显示 Cluster successfully created 表示成功)

MySQL localhost:3311 ssl JS > var cluster = dba.createCluster("ytt_mgr");

Cluster successfully created. Use Cluster.addInstance() to add MySQL instances.

At least 3 instances are needed for the cluster to be able to withstand up to

one server failure.

7. 添加节点 2,3,4(全部显示 OK,表示添加成功)MySQL localhost:3311 ssl JS > cluster.addInstance("root@centos-ytt57-2:3312");MySQL localhost:3311 ssl JS > cluster.addInstance("root@centos-ytt57-3:3311");MySQL localhost:3311 ssl JS > cluster.addInstance("root@centos-ytt57-3:3312");

8. 查看拓扑图:(describe 简单信息,status 详细描述)

MySQL localhost:3311 ssl JS > cluster.describe()

{

"clusterName": "ytt_mgr",

"defaultReplicaSet": {

"name": "default",

"topology": [

{

2022-10-29 06:45:22
唐梦
唐梦
从业4年
商标撤三申请商标补证
所在地区:湖南湘江新区
咨询解答:713
咨询TA

光凭这句话,看不出来MGR的意思。但是,在这句话前面就应该曾经把这个简称的全名写出来过。可以自己去查查看。

2022-10-29 08:32:10
没有符合您的答案?立即联系 “在线顾问"
顾问推荐
{{item.label}}
{{item.desc}}
相关资讯 换一批
杨娜
杨娜顾问
擅长:商标驳回复审,商标异议,商标撤三
执业4年
咨询专业顾问
最新问答
2023-06-19 06:34:24
北京海丰益商贸中心基本介绍?
北京海丰益商贸中心基本介绍?
2023-06-19 06:33:56
北京佳兴源装饰有限公司第一分公司公司大概情况
北京佳兴源装饰有限公司第一分公司公司大概情况
2023-06-19 06:33:29
北京君燕环保设备有限公司是多久时候成立的?
北京君燕环保设备有限公司是多久时候成立的?
2023-06-19 06:32:19
北京市华盛业石材经营部是多久时候成立的?
北京市华盛业石材经营部是多久时候成立的?
2023-06-19 06:31:54
北京市四季永芳石材经营部基本介绍?
北京市四季永芳石材经营部基本介绍?