Configuring Outbound Replication
from DB System to External Replica
A replication channel is configured on the replica, so when you use an
external MySQL instance as the replica, you configure the replication channel by
running commands on that server. You do not need to define the channel inHeatWave Service.
Using a Command-Line
Client 🔗
Use a command-line client such as MySQL Client or MySQL Shell to configure
outbound replication from a DB system to an external replica.
A command-line client such as MySQL Client or MySQL
Shell.
Do the following to configure outbound replication from a source DB system to
an external replica:
Open MySQL Shell and connect to the replica.
On the replica, specify the replication source by running the
following command in the SQL execution mode
:
CHANGE REPLICATION SOURCE TO SOURCE_HOST='<DBSystemIPAddress>',
SOURCE_PORT=3306, SOURCE_USER='<SourceUser>', SOURCE_PASSWORD='<SourcePassword>', SOURCE_SSL=1,
SOURCE_AUTO_POSITION=1 FOR CHANNEL '<ChannelName>';
SOURCE_HOST:
Specify the IP address of the source DB
system.
SOURCE_PORT:
Specify the port the source is configured to use.
The default port is 3306.
SOURCE_USER:
Specify the username of the replication user that
you created on the source DB system.
SOURCE_PASSWORD:
Specify the password of the replication user.
SOURCE_SSL=1:
Specify that the connection uses SSL
encryption.
SOURCE_AUTO_POSITION=1: Specify
that the replica connects to the source using the
auto-positioning feature of GTID-based
replication, rather than a binary log file based
position.
CHANNEL: Specify
a replication channel. This either uses an
existing replication channel with the supplied
channel name or, if the channel does not exist,
creates one using the supplied name.
To start replication, run the following command on the
replica:
START REPLICA FOR CHANNEL '<ChannelName>';
<ChannelName>:
Specify the name of the channel.
To view the replication status, run any of the following
commands: