In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-26 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article is to share with you about the construction of MySQL 5.7.17 Group Relication. The editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.
The editor introduces the architecture of the two working modes of Group Replication.
It also describes in detail the deployment process of Single-Master Mode and how to switch to Multi-Master Mode.
Of course, the configuration requirements and some limitations of Group Replication are given at the end of the paper.
0 structure introduction
In the 5.7.17 version of MySQL released in December 2016, Oracle announced that Group Replication has been GA.
Group Replication (hereinafter referred to as GR) has two operating modes, Single-Master Mode and Multi-Master Mode:
Failover diagram of Single-Master Mode:
Only primary members can read and write, while other nodes are read-only. When a primary member fails, other members will replace it as primary.
Failover diagram of Multi-Master Mode:
All members can read and write.
With regard to the problem of cerebral fissure, it can be found that there are similarities between MySQL Group Replication and MongoDB Relicate Set:
Similar to MongoDB's Relicate Set, the read-write library is similar to Primary and the read-only library is similar to Secondary.
(the following picture is from the official MySQL)
(the following figure is from MongoDB 3.4 Manual)
0 deployment
Number of test instances: 3
Version: MySQL 5.7.17
Installation (binary package installation is used here)
Mysql-5.7.17-linux-glibc2.5-x86_64.tar.gz
Create a data directory and a log directory:
Loose-group_replication_single_primary_mode=FALSE
Loose-group_replication_enforce_update_everywhere_checks=TRUE
(the values of the parameters single-master mode are TRUE and FALSE)
0 requirements and restrictions
Available only for the InnoDB storage engine (requires transaction support and row-level locking)
A table must have a primary key (creating a table without a primary key will not report an error, but throwing: ERROR 3098 (HY000): The table does not comply with the requirements by an external plugin.) when inserting data.
GTID must be enabled
Binary log must be turned on, and its format must be ROW (binlog_format=row)
Conflict DDl and DML can only be executed successfully on the same member
In a multi-master structure, foreign keys are not fully supported (there is no problem in a single master structure)
Transaction isolation level of serializable is not supported
Only IPv4 is supported, and a low latency, high bandwidth network environment is required.
GR supports up to 9 members
Replication information metadata must exist in system tables (master-info-repository=TABLE, relay-log-info-repository=TABLE)
Binary log checksums must be turned off (binlog-checksum=NONE)
The use of savepoint is not supported
The above is how the MySQL 5.7.17 Group Relication is built, and the editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un