Creating a Replication Channel
For inbound replication, a replication channel connects the source (a MySQL instance or another DB system) to the replica (a DB system), and copies data from the source to the replica.
Using the Console
Use the Console to create a replication channel.
- A MySQL source server that meets the requirements in Source Configuration.
- A replication user on the MySQL source server. See Creating a Replication User On a Source Server.
- An active DB system where you have imported the existing data from the source server. See Importing Using the Data Import Feature. If the source server is a DB system in MySQL HeatWave Service in the same region, you can restore the data from the DB system backup. See Restoring From a Backup.
If you left Enabled automatically upon creation checked, as soon as the channel has been created successfully, it enters Active state and starts replicating data from the source to the target.
If you uncheck the box, the channel enters Inactive state. In that case, when you are ready for the channel to start replicating data, enable it following the steps in Enabling or Disabling a Channel.
Related Topics
Channel Filter Rules
Configure the type and value of channel filters for replication.
Each filter rule can contain only one filter type and value. However, you can add any
number of filter rules and the result is the addition of all filter rules. For
example, if you create a filter rule with type, REPLICATE_DO_DB
,
and filter value, mysql1
, and another filter rule, with type,
REPLICATE_DO_DB
, and filter value, mysql2
,
then both mysql1
and mysql2
databases are
replicated.
Table 13-1 Channel Filter Rules
Filter Type | Filter Value | Details |
---|---|---|
REPLICATE_DO_DB |
database |
Replicates the specified database. |
REPLICATE_IGNORE_DB |
database |
Restricts the replication of the specified database. |
REPLICATE_DO_TABLE |
database.table |
Replicates the specified table in the database. |
REPLICATE_IGNORE_TABLE |
database.table |
Restricts the replication of the specified table in the database. |
REPLICATE_WILD_DO_TABLE |
database.table |
Replicates the table that matches the specified wildcard pattern. |
REPLICATE_WILD_IGNORE_TABLE |
database.table |
Restricts the replication of any table that matches the specified wildcard pattern. |
REPLICATE_REWRITE_DB |
from_database->to_database |
Translates from_database on the source to
to_database .
|
Wildcard Patterns
Wildcard patterns can contain the % and _ wildcard characters. % represents 0 or more characters and _ represents any single character. For example:
- A filter value,
foo%.bar%
, in filter type,REPLICATE_DO_DB
, replicates only those tables where the database name starts withfoo
and the table name starts withbar
. - A filter value,
foo%.%
, in filter type,REPLICATE_DO_DB
, replicates all tables where the database name starts withfoo%
. - A filter value,
foo_.bar_
, in filter type,REPLICATE_IGNORE_DB
, ignore those tables where the database name contains four characters and starts withfoo
and the table name contains four character and starts withbar
.
If you literally want to use one of the two wildcard characters, % and _, escape
them with a backslash (\). For example, my\_table.