Documentation Home
MySQL 8.2 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 40.3Mb
PDF (A4) - 40.4Mb
Man Pages (TGZ) - 266.0Kb
Man Pages (Zip) - 370.5Kb
Info (Gzip) - 4.0Mb
Info (Zip) - 4.0Mb
Excerpts from this Manual

MySQL 8.2 Reference Manual  /  Group Replication

Chapter 18 Group Replication

Table of Contents

18.1 Group Replication Background
18.1.1 Replication Technologies
18.1.2 Group Replication Use Cases
18.1.3 Multi-Primary and Single-Primary Modes
18.1.4 Group Replication Services
18.1.5 Group Replication Plugin Architecture
18.2 Getting Started
18.2.1 Deploying Group Replication in Single-Primary Mode
18.2.2 Deploying Group Replication Locally
18.3 Requirements and Limitations
18.3.1 Group Replication Requirements
18.3.2 Group Replication Limitations
18.4 Monitoring Group Replication
18.4.1 GTIDs and Group Replication
18.4.2 Group Replication Server States
18.4.3 The replication_group_members Table
18.4.4 The replication_group_member_stats Table
18.5 Group Replication Operations
18.5.1 Configuring an Online Group
18.5.2 Restarting a Group
18.5.3 Transaction Consistency Guarantees
18.5.4 Distributed Recovery
18.5.5 Support For IPv6 And For Mixed IPv6 And IPv4 Groups
18.5.6 Using MySQL Enterprise Backup with Group Replication
18.6 Group Replication Security
18.6.1 Communication Stack for Connection Security Management
18.6.2 Securing Group Communication Connections with Secure Socket Layer (SSL)
18.6.3 Securing Distributed Recovery Connections
18.6.4 Group Replication IP Address Permissions
18.7 Group Replication Performance and Troubleshooting
18.7.1 Fine Tuning the Group Communication Thread
18.7.2 Flow Control
18.7.3 Single Consensus Leader
18.7.4 Message Compression
18.7.5 Message Fragmentation
18.7.6 XCom Cache Management
18.7.7 Responses to Failure Detection and Network Partitioning
18.7.8 Handling a Network Partition and Loss of Quorum
18.7.9 Monitoring Group Replication Memory Usage with Performance Schema Memory Instrumentation
18.8 Upgrading Group Replication
18.8.1 Combining Different Member Versions in a Group
18.8.2 Group Replication Offline Upgrade
18.8.3 Group Replication Online Upgrade
18.9 Group Replication Variables
18.9.1 Group Replication System Variables
18.9.2 Group Replication Status Variables
18.10 Frequently Asked Questions

This chapter explains Group Replication in MySQL 8.2, and how to install, configure and monitor groups. MySQL Group Replication enables you to create elastic, highly-available, fault-tolerant replication topologies.

Groups can operate in a single-primary mode with automatic primary election, where only one server accepts updates at a time. Alternatively, groups can be deployed in multi-primary mode, where all servers can accept updates, even if they are issued concurrently.

There is a built-in group membership service that keeps the view of the group consistent and available for all servers at any given point in time. Servers can leave and join the group and the view is updated accordingly. Sometimes servers can leave the group unexpectedly, in which case the failure detection mechanism detects this and notifies the group that the view has changed. This is all automatic.

Group Replication guarantees that the database service is continuously available. However, it is important to understand that if one of the group members becomes unavailable, the clients connected to that group member must be redirected, or failed over, to a different server in the group, using a connector, load balancer, router, or some form of middleware. Group Replication does not have an inbuilt method to do this. For example, see MySQL Router 8.2.

Group Replication is provided as a plugin to MySQL Server. You can follow the instructions in this chapter to configure the plugin on each of the server instances that you want in the group, start up the group, and monitor and administer the group. An alternative way to deploy a group of MySQL server instances is by using InnoDB Cluster.


To deploy multiple instances of MySQL, you can use InnoDB Cluster which enables you to easily administer a group of MySQL server instances in MySQL Shell. InnoDB Cluster wraps MySQL Group Replication in a programmatic environment that enables you easily deploy a cluster of MySQL instances to achieve high availability. In addition, InnoDB Cluster interfaces seamlessly with MySQL Router, which enables your applications to connect to the cluster without writing your own failover process. For similar use cases that do not require high availability, however, you can use InnoDB ReplicaSet. Installation instructions for MySQL Shell can be found here.

The chapter is structured as follows: