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 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
REPLICATE_WILD_DO_TABLE
and REPLICATE_WILD_IGNORE_TABLE
support wildcards. Wildcard patterns can contain the % and _ wildcard characters. % represents 0 or more characters and _ represents any single character. For example:
- A filter value of
foo%.bar%
in filter typeREPLICATE_WILD_DO_TABLE
replicates only those tables where the database name starts withfoo
and the table name starts withbar
. - A filter value of
foo%.%
in filter typeREPLICATE_WILD_DO_TABLE
replicates all tables where the database name starts withfoo
. - A filter value of
foo_.bar_
in filter typeREPLICATE_WILD_IGNORE_TABLE
ignores those tables where the database name contains four characters and starts withfoo
and the table name contains four character and starts withbar
.
If you want to use any of the wildcard characters literally in the database or table names in REPLICATE_WILD_DO_TABLE
or REPLICATE_WILD_IGNORE_TABLE
, escape them with backslashes (\
). For example, my\_db.top\_90\%
.