Replication
This section describes Replication in MySQL Database Service.
Inbound Replication
Enables asynchronous replication from a MySQL source to a DB System.
The following inbound replication scenarios are supported:
- On-premise MySQL instance to DB System.
Note
This replication scenario requires an additional network configuration to bridge the local network and the VCN to which the DB System is attached. VPN Connect, FastConnect, or OpenVPN can be used with Inbound Replication.Note
The minimum supported version of MySQL for a replication source is 5.7.9. - MySQL installed on Compute Instance (such as MySQL on the Oracle Cloud Infrastructure Marketplace) to DB System.
Inbound Replication requires a replication channel configured in MySQL Database Service, connecting a correctly configured MySQL Source to a DB System target.
For more information on MySQL Replication, see MySQL Reference Manual - Replication.
Limitations
- Only Row-based replication supported.
- Only GTID-based replication is supported.
- Multi-source replication is not supported.
- Replication filters are not supported.
- Changes to the
mysql
schema are not replicated and cause replication to stop. - Source must run with the same
lower_case_table_names
value, as the DB System. This value is 0. It is not currently possible to change it. - The inbound applier runs under the privileges of the DB System's admin user. See Default MySQL Privileges for more information.
Source Configuration
- A replication user must be configured on the source server. For more information, see Creating the Replication User on the MySQL Source.
- If you intend to encrypt the communication between source and target, you must configure your source to use SSL. For more information, see Server-side Configuration for Encrypted Connections.
Creating the Replication User on the MySQL Source
A replication channel requires a correctly configured user, with the appropriate MySQL privileges, on the MySQL source server. This task creates a replication user named rpluser001
with the password Rpl001#!
.
Creating a Replication Channel
- If you are using an external MySQL source, a correctly configured network. VPN Connect, FastConnect, or OpenVPN can be used with Inbound Replication.
- A replication user must exist on the MySQL source server. For more information, see Creating the Replication User on the MySQL Source.
- The MySQL source server's
GTID_MODE
variable must be set toON
. For more information onGTID_MODE
, see MySQL Reference Manual - GTID_MODE - An active DB System to replicate to.
Populating the DB System with MySQL Shell
Import data from your on-premise database to your DB System before starting your Inbound Replication channel.
- The source's
GTID_MODE
variable must be set toON
. For more information onGTID_MODE
, see MySQL Reference Manual - GTID_MODE
Managing Channels
Channel Details
Channel Details page enables you to view and manage your replication channels.
Table 13-1 Elements of the Channel Details page
Name | Description |
---|---|
Channel Information | Basic information on the channel and its configuration.
|
Source and Target | Contains the following sections:
|
Resetting a Channel
A channel reset removes all data on the channel, except the channel's configuration, and is equivalent to RESET SLAVE ALL FOR CHANNEL
. The target DB System drops its position in the source's binary log, clears the replication metadata repositories, deletes the relay log files, and starts a new relay log file.
- The channel is disabled. Reset is not possible on channels which are enabled.