Table of Contents
- 2.1 Binary Log File Position Based Replication Configuration Overview
- 2.2 Setting Up Binary Log File Position Based Replication
- 2.2.1 Setting the Replication Source Configuration
- 2.2.2 Setting the Replica Configuration
- 2.2.3 Creating a User for Replication
- 2.2.4 Obtaining the Replication Source Binary Log Coordinates
- 2.2.5 Choosing a Method for Data Snapshots
- 2.2.6 Setting Up Replicas
- 2.2.7 Setting the Source Configuration on the Replica
- 2.2.8 Adding Replicas to a Replication Environment
- 2.3 Replication with Global Transaction Identifiers
- 2.3.1 GTID Format and Storage
- 2.3.2 GTID Life Cycle
- 2.3.3 GTID Auto-Positioning
- 2.3.4 Setting Up Replication Using GTIDs
- 2.3.5 Using GTIDs for Failover and Scaleout
- 2.3.6 Replication From a Source Without GTIDs to a Replica With GTIDs
- 2.3.7 Restrictions on Replication with GTIDs
- 2.3.8 Stored Function Examples to Manipulate GTIDs
- 2.4 Changing GTID Mode on Online Servers
- 2.5 MySQL Multi-Source Replication
- 2.5.1 Configuring Multi-Source Replication
- 2.5.2 Provisioning a Multi-Source Replica for GTID-Based Replication
- 2.5.3 Adding GTID-Based Sources to a Multi-Source Replica
- 2.5.4 Adding Binary Log Based Replication Sources to a Multi-Source Replica
- 2.5.5 Starting Multi-Source Replicas
- 2.5.6 Stopping Multi-Source Replicas
- 2.5.7 Resetting Multi-Source Replicas
- 2.5.8 Monitoring Multi-Source Replication
- 2.6 Replication and Binary Logging Options and Variables
- 2.7 Common Replication Administration Tasks
This section describes how to configure the different types of replication available in MySQL and includes the setup and configuration required for a replication environment, including step-by-step instructions for creating a new replication environment. The major components of this section are:
For a guide to setting up two or more servers for replication using binary log file positions, Section 2.2, “Setting Up Binary Log File Position Based Replication”, deals with the configuration of the servers and provides methods for copying data between the source and replicas.
For a guide to setting up two or more servers for replication using GTID transactions, Section 2.3, “Replication with Global Transaction Identifiers”, deals with the configuration of the servers.
Events in the binary log are recorded using a number of formats. These are referred to as statement-based replication (SBR) or row-based replication (RBR). A third type, mixed-format replication (MIXED), uses SBR or RBR replication automatically to take advantage of the benefits of both SBR and RBR formats when appropriate. The different formats are discussed in Section 5.1, “Replication Formats”.
Detailed information on the different configuration options and variables that apply to replication is provided in Section 2.6, “Replication and Binary Logging Options and Variables”.
Once started, the replication process should require little administration or monitoring. However, for advice on common tasks that you may want to execute, see Section 2.7, “Common Replication Administration Tasks”.