<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged database-replication</title>
<link>https://coderlegion.com/tag/database-replication</link>
<description>Powered by Question2Answer</description>
<item>
<title>MySQL HeatWave: Replicating to MySQL Server (Outbound Replication)</title>
<link>https://coderlegion.com/7712/mysql-heatwave-replicating-to-mysql-server-outbound-replication</link>
<description>&lt;p&gt;Outbound replication enables you to copy data from a MySQL HeatWave DB system to external MySQL instances, supporting data distribution, disaster recovery, and hybrid cloud architectures. Unlike inbound replication where HeatWave acts as the replica, outbound replication positions HeatWave as the source, allowing you to replicate data to on-premises servers, cloud compute instances, or other DB systems.&lt;/p&gt;
&lt;p&gt;This guide covers outbound replication scenarios, configuration, prerequisites, and best practices.&lt;/p&gt;
&lt;h3 id=&quot;what-is-outbound-replication-&quot;&gt;What is Outbound Replication?&lt;/h3&gt;
&lt;p&gt;Outbound replication uses a replication channel to copy transactions from a DB system to another location asynchronously. A channel connects the source DB system (HeatWave) to a replica database (external MySQL instance or another DB system), copying data changes from source to replica.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Key Characteristics&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Source&lt;/strong&gt;: MySQL HeatWave DB system&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Replica&lt;/strong&gt;: External MySQL instance or another DB system&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Asynchronous&lt;/strong&gt;: Replica doesn't need constant connection&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Channel Configuration&lt;/strong&gt;: Always configured on the replica&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Scale-Out&lt;/strong&gt;: Enables read scaling by distributing load&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Important&lt;/strong&gt;: You can configure only a DB system as the source; you cannot configure a read replica as the source.&lt;/p&gt;
&lt;h3 id=&quot;supported-outbound-replication-scenarios&quot;&gt;Supported Outbound Replication Scenarios&lt;/h3&gt;
&lt;p&gt;MySQL HeatWave supports three primary outbound replication scenarios. In all scenarios, the replica must be the same version as, or a higher version of MySQL than, the DB system source.&lt;/p&gt;
&lt;h4 id=&quot;1-db-system-to-on-premises-mysql-instance&quot;&gt;1. DB System to On-Premises MySQL Instance&lt;/h4&gt;
&lt;p&gt;Replicate from a DB system to an on-premises MySQL server.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Use Cases&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Data repatriation from cloud&lt;/li&gt;
&lt;li&gt;Hybrid cloud architectures&lt;/li&gt;
&lt;li&gt;Local reporting and analytics&lt;/li&gt;
&lt;li&gt;Disaster recovery to on-premises&lt;/li&gt;
&lt;li&gt;Compliance requirements for local data&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;2-db-system-to-mysql-on-cloud-compute&quot;&gt;2. DB System to MySQL on Cloud Compute&lt;/h4&gt;
&lt;p&gt;Replicate to a MySQL instance installed on OCI compute instance or other cloud providers (AWS, Azure, GCP).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Use Cases&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Custom MySQL configurations not available in managed service&lt;/li&gt;
&lt;li&gt;Testing new MySQL versions&lt;/li&gt;
&lt;li&gt;Migration staging environments&lt;/li&gt;
&lt;li&gt;Cross-cloud data distribution&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;3-db-system-to-db-system&quot;&gt;3. DB System to DB System&lt;/h4&gt;
&lt;p&gt;Replicate from one DB system to another DB system, both on OCI.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Use Cases&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Cross-region replication&lt;/li&gt;
&lt;li&gt;Data distribution across geographies&lt;/li&gt;
&lt;li&gt;Reporting replicas&lt;/li&gt;
&lt;li&gt;Development/test environment refresh&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: Prior to MySQL 8.3.0-u2, you cannot perform outbound replication from a DB system with MySQL HeatWave Lakehouse enabled. As of MySQL 8.3.0-u2+, outbound replication is supported with Lakehouse, but Lakehouse tables can only replicate to replica DB systems, not external replicas.&lt;/p&gt;
&lt;h3 id=&quot;outbound-vs-inbound-replication&quot;&gt;Outbound vs. Inbound Replication&lt;/h3&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;&lt;th&gt;Aspect &lt;/th&gt;&lt;th&gt;Outbound Replication &lt;/th&gt;&lt;th&gt;Inbound Replication&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Source&lt;/strong&gt; &lt;/td&gt;&lt;td&gt;HeatWave DB System &lt;/td&gt;&lt;td&gt;External MySQL or DB System&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Replica&lt;/strong&gt; &lt;/td&gt;&lt;td&gt;External MySQL or DB System &lt;/td&gt;&lt;td&gt;HeatWave DB System&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Channel Config&lt;/strong&gt; &lt;/td&gt;&lt;td&gt;On replica &lt;/td&gt;&lt;td&gt;In HeatWave Service&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Use Case&lt;/strong&gt; &lt;/td&gt;&lt;td&gt;Data out of cloud &lt;/td&gt;&lt;td&gt;Data into cloud&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;&lt;strong&gt;Management&lt;/strong&gt; &lt;/td&gt;&lt;td&gt;Manual on replica &lt;/td&gt;&lt;td&gt;Managed in OCI Console&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h3 id=&quot;prerequisites-for-outbound-replication&quot;&gt;Prerequisites for Outbound Replication&lt;/h3&gt;
&lt;h4 id=&quot;source-db-system-requirements&quot;&gt;Source DB System Requirements&lt;/h4&gt;
&lt;h5 id=&quot;1-active-db-system&quot;&gt;1. Active DB System&lt;/h5&gt;
&lt;p&gt;An active MySQL HeatWave DB system must be available as the replication source.&lt;/p&gt;
&lt;h5 id=&quot;2-binary-logging-enabled&quot;&gt;2. Binary Logging Enabled&lt;/h5&gt;
&lt;p&gt;Binary logging is enabled by default on all DB systems. Verify:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;-- On source DB system
SHOW VARIABLES LIKE 'log_bin';
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;3-row-based-replication&quot;&gt;3. Row-Based Replication&lt;/h5&gt;
&lt;p&gt;Row-based binary logging must be enabled (default):&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;SHOW VARIABLES LIKE 'binlog_format';
-- Should return: ROW
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;4-gtid-mode-enabled-recommended-&quot;&gt;4. GTID Mode Enabled (Recommended)&lt;/h5&gt;
&lt;p&gt;GTID mode is disabled by default on DB systems but strongly recommended for outbound replication.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why GTID Matters&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Simplifies replication setup with auto-positioning&lt;/li&gt;
&lt;li&gt;Easier failover and recovery&lt;/li&gt;
&lt;li&gt;Better tracking of transactions&lt;/li&gt;
&lt;li&gt;Reduces configuration complexity&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: GTID mode is a compatibility option you must consider when creating your DB system.&lt;/p&gt;
&lt;h5 id=&quot;5-replication-user-account&quot;&gt;5. Replication User Account&lt;/h5&gt;
&lt;p&gt;Create a dedicated replication user on the source DB system with required privileges.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Create replication user&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;-- Connect to source DB system
CREATE USER 'repl_user'@'%' 
  IDENTIFIED BY 'SecurePassword123!' 
  REQUIRE SSL;

GRANT REPLICATION SLAVE ON *.* TO 'repl_user'@'%';
FLUSH PRIVILEGES;
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;replica-mysql-server-requirements&quot;&gt;Replica MySQL Server Requirements&lt;/h4&gt;
&lt;h5 id=&quot;1-mysql-version-compatibility&quot;&gt;1. MySQL Version Compatibility&lt;/h5&gt;
&lt;p&gt;The replica must be the same version as, or a higher version than, the DB system source. For example, you can replicate from MySQL 8.0 to MySQL 8.4, but not from MySQL 8.4 to MySQL 8.0.&lt;/p&gt;
&lt;h5 id=&quot;2-compatible-configuration-options&quot;&gt;2. Compatible Configuration Options&lt;/h5&gt;
&lt;p&gt;The replica must have matching configuration for certain system variables:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;lowercase_table_names&lt;/strong&gt;: The source and replica must run with the same &lt;code&gt;lower_case_table_names&lt;/code&gt; system variable value (0, 1, or 2).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Enable Partial Revoke&lt;/strong&gt; (if used on source): If your source DB system uses partial revokes, the replica must also have this enabled:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;-- On replica
SET GLOBAL partial_revokes = ON;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;GTID Mode&lt;/strong&gt; (recommended): If source uses GTID, replica should have GTID enabled:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;-- On replica
SET GLOBAL enforce_gtid_consistency = ON;
SET GLOBAL gtid_mode = OFF_PERMISSIVE;
SET GLOBAL gtid_mode = ON_PERMISSIVE;
SET GLOBAL gtid_mode = ON;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Timezone Information Loaded&lt;/strong&gt;: If your source DB system uses named timezones, load timezone information on the replica:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;# On replica server
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -u root -p mysql
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;3-bi-directional-communication-enabled&quot;&gt;3. Bi-Directional Communication Enabled&lt;/h5&gt;
&lt;p&gt;The replica must be able to connect to the source DB system:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Network path exists (VPN, FastConnect, direct connectivity)&lt;/li&gt;
&lt;li&gt;Firewall rules allow MySQL port (3306)&lt;/li&gt;
&lt;li&gt;Security lists/NSGs permit traffic&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id=&quot;4-row-based-binary-logging&quot;&gt;4. Row-Based Binary Logging&lt;/h5&gt;
&lt;p&gt;The replica should also use row-based replication:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;SET GLOBAL binlog_format = 'ROW';
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;network-connectivity-options&quot;&gt;Network Connectivity Options&lt;/h3&gt;
&lt;h4 id=&quot;connecting-external-mysql-to-heatwave-source&quot;&gt;Connecting External MySQL to HeatWave Source&lt;/h4&gt;
&lt;p&gt;For external MySQL servers replicating FROM HeatWave, establish connectivity:&lt;/p&gt;
&lt;h5 id=&quot;option-1-network-load-balancer&quot;&gt;Option 1: Network Load Balancer&lt;/h5&gt;
&lt;p&gt;Set up a Network Load Balancer to provide external access to the DB system:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Steps&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create Network Security Group allowing access from replica IP&lt;/li&gt;
&lt;li&gt;Configure LB Listener (add NSG)&lt;/li&gt;
&lt;li&gt;Configure LB Backend&lt;/li&gt;
&lt;li&gt;Specify Health Check Policy&lt;/li&gt;
&lt;li&gt;Configure backend to access MySQL source&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Security&lt;/strong&gt;: Enforce SSL/TLS for all connections.&lt;/p&gt;
&lt;h5 id=&quot;option-2-site-to-site-vpn&quot;&gt;Option 2: Site-to-Site VPN&lt;/h5&gt;
&lt;p&gt;For on-premises replicas:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;IPSec VPN tunnel over internet&lt;/li&gt;
&lt;li&gt;Encrypted connectivity&lt;/li&gt;
&lt;li&gt;Up to 250 Mbps per tunnel&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id=&quot;option-3-fastconnect&quot;&gt;Option 3: FastConnect&lt;/h5&gt;
&lt;p&gt;For production on-premises replicas:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Dedicated private connection&lt;/li&gt;
&lt;li&gt;Up to 10 Gbps bandwidth&lt;/li&gt;
&lt;li&gt;Predictable performance&lt;/li&gt;
&lt;li&gt;Lower latency&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;loading-initial-data-from-db-system-to-mysql-server&quot;&gt;Loading Initial Data from DB System to MySQL Server&lt;/h3&gt;
&lt;p&gt;Before starting replication, export existing data from the source to the replica.&lt;/p&gt;
&lt;h4 id=&quot;step-1-export-data-from-source-db-system&quot;&gt;Step 1: Export Data from Source DB System&lt;/h4&gt;
&lt;p&gt;Use MySQL Shell Instance Dump utility to export data:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;mysqlsh admin@&amp;lt;DB_SYSTEM_IP&amp;gt;:3306 -- util dump-instance /path/to/dump \
  --excludeSchemas=mysql,sys,performance_schema,information_schema \
  --ocimds=true
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;What This Exports&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;All user schemas and data&lt;/li&gt;
&lt;li&gt;User accounts and privileges&lt;/li&gt;
&lt;li&gt;GTID executed position&lt;/li&gt;
&lt;li&gt;Excludes system schemas&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Why Exclude System Schemas&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;System schemas managed differently&lt;/li&gt;
&lt;li&gt;Prevents replication conflicts&lt;/li&gt;
&lt;li&gt;User accounts can be recreated separately&lt;/li&gt;
&lt;li&gt;Best practice for replication setup&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Important&lt;/strong&gt;: If using GTID-based replication, capture the value of the source server's system variable &lt;code&gt;gtid_executed&lt;/code&gt; from the dump metadata.&lt;/p&gt;
&lt;h4 id=&quot;step-2-import-data-into-replica-mysql-server&quot;&gt;Step 2: Import Data into Replica MySQL Server&lt;/h4&gt;
&lt;p&gt;Import the dump into your replica MySQL instance:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;mysqlsh admin@&amp;lt;REPLICA_IP&amp;gt;:3306 -- util load-dump /path/to/dump \
  --includeSchemas=&amp;lt;schema_list&amp;gt; \
  --progressFile=/path/to/progress.json
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Import User Accounts&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;mysqlsh admin@&amp;lt;REPLICA_IP&amp;gt;:3306 -- util load-dump /path/to/dump \
  --includeUsers=true \
  --excludeUsers=admin,root
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;step-3-update-gtid-purged-settings&quot;&gt;Step 3: Update gtid_purged Settings&lt;/h4&gt;
&lt;p&gt;If using GTID-based replication, set gtid_purged on the replica:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;-- On replica
RESET MASTER;
SET GLOBAL gtid_purged='&amp;lt;gtid_executed_value&amp;gt;';
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;SET GLOBAL gtid_purged='3E11FA47-71CA-11E1-9E33-C80AA9429562:1-5';
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;configuring-outbound-replication-channel&quot;&gt;Configuring Outbound Replication Channel&lt;/h3&gt;
&lt;p&gt;The replication channel is always configured on the replica (not in HeatWave Service for outbound replication).&lt;/p&gt;
&lt;h4 id=&quot;configuration-parameters&quot;&gt;Configuration Parameters&lt;/h4&gt;
&lt;h5 id=&quot;source-connection-settings&quot;&gt;Source Connection Settings&lt;/h5&gt;
&lt;p&gt;&lt;strong&gt;source_host&lt;/strong&gt;: IP address or hostname of the source DB system&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;SOURCE_HOST='10.0.1.100'
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;source_port&lt;/strong&gt;: MySQL port (default 3306)&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;SOURCE_PORT=3306
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;source_user&lt;/strong&gt;: Replication user account&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;SOURCE_USER='repl_user'
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;source_password&lt;/strong&gt;: Replication user password&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;SOURCE_PASSWORD='SecurePassword123!'
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;source_ssl&lt;/strong&gt;: Enable SSL/TLS (recommended)&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;SOURCE_SSL=1
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;replication-positioning&quot;&gt;Replication Positioning&lt;/h5&gt;
&lt;p&gt;&lt;strong&gt;GTID Auto-Positioning&lt;/strong&gt; (recommended):&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;SOURCE_AUTO_POSITION=1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Manual Binary Log Positioning&lt;/strong&gt; (if GTID not used):&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;SOURCE_LOG_FILE='mysql-bin.000003'
SOURCE_LOG_POS=154
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;setting-up-the-replication-channel&quot;&gt;Setting Up the Replication Channel&lt;/h4&gt;
&lt;p&gt;Connect to the replica MySQL server and run:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;-- Using GTID auto-positioning (recommended)
CHANGE REPLICATION SOURCE TO
  SOURCE_HOST='&amp;lt;DB_SYSTEM_IP&amp;gt;',
  SOURCE_PORT=3306,
  SOURCE_USER='repl_user',
  SOURCE_PASSWORD='SecurePassword123!',
  SOURCE_SSL=1,
  SOURCE_AUTO_POSITION=1;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Without GTID&lt;/strong&gt; (manual positioning):&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;CHANGE REPLICATION SOURCE TO
  SOURCE_HOST='&amp;lt;DB_SYSTEM_IP&amp;gt;',
  SOURCE_PORT=3306,
  SOURCE_USER='repl_user',
  SOURCE_PASSWORD='SecurePassword123!',
  SOURCE_SSL=1,
  SOURCE_LOG_FILE='mysql-bin.000003',
  SOURCE_LOG_POS=154;
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;starting-replication&quot;&gt;Starting Replication&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;START REPLICA;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Or for older MySQL versions:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;START SLAVE;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;managing-replication&quot;&gt;Managing Replication&lt;/h3&gt;
&lt;h4 id=&quot;checking-replication-status&quot;&gt;Checking Replication Status&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;SHOW REPLICA STATUS\G
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Key Metrics&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Replica_IO_Running&lt;/code&gt;: Should be &quot;Yes&quot;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Replica_SQL_Running&lt;/code&gt;: Should be &quot;Yes&quot;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Seconds_Behind_Source&lt;/code&gt;: Replication lag&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Last_IO_Error&lt;/code&gt;: IO thread errors&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Last_SQL_Error&lt;/code&gt;: SQL thread errors&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;stopping-replication&quot;&gt;Stopping Replication&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;STOP REPLICA;
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;resetting-replication&quot;&gt;Resetting Replication&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Warning&lt;/strong&gt;: This clears all replication position data.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;STOP REPLICA;
RESET REPLICA ALL;
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;reconfiguring-the-channel&quot;&gt;Reconfiguring the Channel&lt;/h4&gt;
&lt;p&gt;To change replication settings:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;STOP REPLICA;

CHANGE REPLICATION SOURCE TO
  SOURCE_HOST='&amp;lt;NEW_IP&amp;gt;',
  SOURCE_USER='&amp;lt;NEW_USER&amp;gt;',
  -- other parameters
  SOURCE_AUTO_POSITION=1;

START REPLICA;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;monitoring-replication&quot;&gt;Monitoring Replication&lt;/h3&gt;
&lt;h4 id=&quot;using-performance-schema&quot;&gt;Using Performance Schema&lt;/h4&gt;
&lt;p&gt;Query replication metrics:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;-- Connection status
SELECT * FROM performance_schema.replication_connection_status\G

-- Applier status
SELECT * FROM performance_schema.replication_applier_status\G

-- Worker threads
SELECT * FROM performance_schema.replication_applier_status_by_worker\G
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;setting-up-alerts&quot;&gt;Setting Up Alerts&lt;/h4&gt;
&lt;p&gt;Monitor these critical metrics:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Replication lag exceeding threshold (e.g., 60 seconds)&lt;/li&gt;
&lt;li&gt;IO or SQL thread stopped&lt;/li&gt;
&lt;li&gt;Replication errors&lt;/li&gt;
&lt;li&gt;Connection failures&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;using-database-management&quot;&gt;Using Database Management&lt;/h4&gt;
&lt;p&gt;If your replica is also a DB system on OCI, use Database Management to monitor:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Active connections&lt;/li&gt;
&lt;li&gt;Statement count&lt;/li&gt;
&lt;li&gt;Fetch state&lt;/li&gt;
&lt;li&gt;Apply state&lt;/li&gt;
&lt;li&gt;Time behind source&lt;/li&gt;
&lt;li&gt;GTID executed&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;common-outbound-replication-issues&quot;&gt;Common Outbound Replication Issues&lt;/h3&gt;
&lt;h4 id=&quot;issue-1-replica-cannot-connect-to-source&quot;&gt;Issue 1: Replica Cannot Connect to Source&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Error&lt;/strong&gt;: &quot;Can't connect to MySQL server on ''&quot;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Causes&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Network Load Balancer not configured&lt;/li&gt;
&lt;li&gt;Security lists blocking traffic&lt;/li&gt;
&lt;li&gt;VPN/FastConnect not established&lt;/li&gt;
&lt;li&gt;Wrong IP or hostname&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Solutions&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Verify Network Load Balancer configuration&lt;/li&gt;
&lt;li&gt;Check security lists allow port 3306&lt;/li&gt;
&lt;li&gt;Test connectivity: &lt;code&gt;telnet &amp;lt;DB_SYSTEM_IP&amp;gt; 3306&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Verify VPN/FastConnect is active&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&quot;issue-2-authentication-failures&quot;&gt;Issue 2: Authentication Failures&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Error&lt;/strong&gt;: &quot;Access denied for user 'repl_user'@''&quot;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Causes&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Replication user not created on source&lt;/li&gt;
&lt;li&gt;Wrong credentials&lt;/li&gt;
&lt;li&gt;User not allowed from replica IP&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Solutions&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Verify user exists on source: &lt;code&gt;SELECT User, Host FROM mysql.user WHERE User = 'repl_user';&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Check credentials are correct&lt;/li&gt;
&lt;li&gt;Verify user grants: &lt;code&gt;SHOW GRANTS FOR 'repl_user'@'%';&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&quot;issue-3-replication-lag-increasing&quot;&gt;Issue 3: Replication Lag Increasing&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Symptoms&lt;/strong&gt;: &lt;code&gt;Seconds_Behind_Source&lt;/code&gt; growing&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Causes&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;High transaction volume on source&lt;/li&gt;
&lt;li&gt;Replica underpowered&lt;/li&gt;
&lt;li&gt;Network bandwidth limitations&lt;/li&gt;
&lt;li&gt;Large transactions&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Solutions&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Increase replica resources&lt;/li&gt;
&lt;li&gt;Optimize slow queries&lt;/li&gt;
&lt;li&gt;Check network bandwidth&lt;/li&gt;
&lt;li&gt;Break large transactions into batches&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&quot;issue-4-ssl-connection-failures&quot;&gt;Issue 4: SSL Connection Failures&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Error&lt;/strong&gt;: SSL-related errors in replication status&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Causes&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;SSL not configured on source&lt;/li&gt;
&lt;li&gt;Certificate issues&lt;/li&gt;
&lt;li&gt;Wrong SSL mode&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Solutions&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Verify source supports SSL&lt;/li&gt;
&lt;li&gt;Use &lt;code&gt;SOURCE_SSL=1&lt;/code&gt; for encrypted connection&lt;/li&gt;
&lt;li&gt;Check certificate validity if using certificate verification&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;best-practices&quot;&gt;Best Practices&lt;/h3&gt;
&lt;h4 id=&quot;1-always-use-gtid-mode&quot;&gt;1. Always Use GTID Mode&lt;/h4&gt;
&lt;p&gt;Enable GTID on both source and replica for simplified management:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Easier failover&lt;/li&gt;
&lt;li&gt;Automatic position tracking&lt;/li&gt;
&lt;li&gt;Simplified reconfiguration&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;2-enforce-ssl-tls-encryption&quot;&gt;2. Enforce SSL/TLS Encryption&lt;/h4&gt;
&lt;p&gt;Always encrypt replication traffic:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;CREATE USER 'repl_user'@'%' 
  IDENTIFIED BY 'SecurePassword!' 
  REQUIRE SSL;
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;3-monitor-replication-lag&quot;&gt;3. Monitor Replication Lag&lt;/h4&gt;
&lt;p&gt;Set up alerts for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Lag &amp;gt; 60 seconds&lt;/li&gt;
&lt;li&gt;IO or SQL thread stopped&lt;/li&gt;
&lt;li&gt;Replication errors&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;4-use-network-load-balancer&quot;&gt;4. Use Network Load Balancer&lt;/h4&gt;
&lt;p&gt;For production external replicas:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Provides stable endpoint&lt;/li&gt;
&lt;li&gt;Enables health checks&lt;/li&gt;
&lt;li&gt;Supports SSL termination&lt;/li&gt;
&lt;li&gt;Better security controls&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;5-plan-for-network-interruptions&quot;&gt;5. Plan for Network Interruptions&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Use appropriate binary log retention on source&lt;/li&gt;
&lt;li&gt;Monitor relay log space on replica&lt;/li&gt;
&lt;li&gt;Test reconnection scenarios&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;6-regular-health-checks&quot;&gt;6. Regular Health Checks&lt;/h4&gt;
&lt;p&gt;Implement automated checks:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;#!/bin/bash
# Check replication health
REPLICA_STATUS=$(mysql -e &quot;SHOW REPLICA STATUS\G&quot; | grep &quot;Replica_.*_Running:&quot; | awk '{print $2}')
if [[ &quot;$REPLICA_STATUS&quot; != &quot;Yes&quot; ]]; then
  echo &quot;Replication issue detected&quot;
  # Send alert
fi
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;7-test-failover-procedures&quot;&gt;7. Test Failover Procedures&lt;/h4&gt;
&lt;p&gt;Regularly test:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Stopping and starting replication&lt;/li&gt;
&lt;li&gt;Switching to different source&lt;/li&gt;
&lt;li&gt;Replica promotion scenarios&lt;/li&gt;
&lt;li&gt;Application behavior during failures&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;8-document-configuration&quot;&gt;8. Document Configuration&lt;/h4&gt;
&lt;p&gt;Maintain documentation of:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Source and replica connection details&lt;/li&gt;
&lt;li&gt;Replication user credentials&lt;/li&gt;
&lt;li&gt;Network paths used&lt;/li&gt;
&lt;li&gt;Failover procedures&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;limitations-for-outbound-replication&quot;&gt;Limitations for Outbound Replication&lt;/h3&gt;
&lt;h4 id=&quot;lakehouse-table-restrictions&quot;&gt;Lakehouse Table Restrictions&lt;/h4&gt;
&lt;p&gt;Lakehouse tables can only replicate to replica DB systems. Replicating Lakehouse tables to external replicas (on-premises MySQL) causes replication to break with errors.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Workaround&lt;/strong&gt;: Exclude Lakehouse tables from replication or only replicate to DB system replicas.&lt;/p&gt;
&lt;h4 id=&quot;prior-to-mysql-8-3-0-u2&quot;&gt;Prior to MySQL 8.3.0-u2&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Cannot perform outbound replication from a DB system with HeatWave Lakehouse enabled&lt;/li&gt;
&lt;li&gt;Cannot enable Lakehouse on HA DB system with HeatWave cluster&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;read-replicas-as-source&quot;&gt;Read Replicas as Source&lt;/h4&gt;
&lt;p&gt;You cannot configure a read replica as the source for outbound replication. Only the primary DB system can serve as the replication source.&lt;/p&gt;
&lt;p&gt;Outbound replication from MySQL HeatWave enables flexible data distribution strategies, supporting hybrid cloud architectures, disaster recovery, and read scaling scenarios. By understanding configuration requirements, network connectivity options, and best practices, you can implement reliable outbound replication for your specific needs.&lt;/p&gt;
&lt;p&gt;Key takeaways:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Source is HeatWave&lt;/strong&gt;: DB system acts as replication source&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Channel on replica&lt;/strong&gt;: Always configure replication on the replica side&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use GTID&lt;/strong&gt;: Simplifies setup and management&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Encrypt traffic&lt;/strong&gt;: Always use SSL/TLS&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Network connectivity&lt;/strong&gt;: Use NLB, VPN, or FastConnect for external replicas&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monitor continuously&lt;/strong&gt;: Track lag, errors, and thread status&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Version compatibility&lt;/strong&gt;: Replica must be same or higher MySQL version&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Whether replicating to on-premises servers, cloud compute instances, or other DB systems, MySQL HeatWave outbound replication provides the flexibility needed for modern distributed architectures.&lt;/p&gt;
</description>
<category>mysql</category>
<guid isPermaLink="true">https://coderlegion.com/7712/mysql-heatwave-replicating-to-mysql-server-outbound-replication</guid>
<pubDate>Mon, 24 Nov 2025 09:16:13 +0000</pubDate>
</item>
<item>
<title>MySQL HeatWave: Replication Channels and Troubleshooting</title>
<link>https://coderlegion.com/7603/mysql-heatwave-replication-channels-and-troubleshooting</link>
<description>&lt;p&gt;Replication channels are the cornerstone of MySQL HeatWave inbound replication, establishing the connection between source databases and replica DB systems. Understanding channel states, operations, and troubleshooting techniques is essential for maintaining reliable data replication. This guide covers channel management, lifecycle states, common errors, and proven troubleshooting strategies.&lt;/p&gt;
&lt;h3 id=&quot;understanding-replication-channels&quot;&gt;Understanding Replication Channels&lt;/h3&gt;
&lt;p&gt;A replication channel represents a path through which changes produced by transactions on a source MySQL server or DB system are replicated to a target DB system.&lt;/p&gt;
&lt;h4 id=&quot;what-channels-do&quot;&gt;What Channels Do&lt;/h4&gt;
&lt;p&gt;Each channel identifies:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A replication source (hostname, port, credentials)&lt;/li&gt;
&lt;li&gt;Configuration required to connect to that source&lt;/li&gt;
&lt;li&gt;How to copy transactions from source to replica&lt;/li&gt;
&lt;li&gt;Replication positioning (GTID or binary log)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Important&lt;/strong&gt;: Channels have their own lifecycle and can be enabled, disabled, reset, and resumed independently.&lt;/p&gt;
&lt;h3 id=&quot;channel-states&quot;&gt;Channel States&lt;/h3&gt;
&lt;p&gt;MySQL HeatWave channels exist in either final states (stable) or transient states (temporary during operations).&lt;/p&gt;
&lt;h4 id=&quot;final-states&quot;&gt;Final States&lt;/h4&gt;
&lt;h5 id=&quot;1-active&quot;&gt;1. ACTIVE&lt;/h5&gt;
&lt;p&gt;Channel is replicating data successfully.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Characteristics&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Both IO and SQL threads running&lt;/li&gt;
&lt;li&gt;Transactions flowing from source to replica&lt;/li&gt;
&lt;li&gt;May have slight replication lag (normal)&lt;/li&gt;
&lt;li&gt;No errors reported&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Console Indicator&lt;/strong&gt;: Green icon with &quot;Active&quot; text&lt;/p&gt;
&lt;h5 id=&quot;2-inactive&quot;&gt;2. INACTIVE&lt;/h5&gt;
&lt;p&gt;Channel is not replicating; replication has been stopped.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Common Reasons&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Channel manually disabled by administrator&lt;/li&gt;
&lt;li&gt;Created with &quot;Enable automatically&quot; unchecked&lt;/li&gt;
&lt;li&gt;DB system is stopped&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Console Indicator&lt;/strong&gt;: Gray icon with &quot;Inactive&quot; text&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;To Resume&lt;/strong&gt;: Enable the channel through console or CLI&lt;/p&gt;
&lt;h5 id=&quot;3-needs-attention&quot;&gt;3. NEEDS_ATTENTION&lt;/h5&gt;
&lt;p&gt;Channel is not replicating due to an error.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Common Causes&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Source server unreachable&lt;/li&gt;
&lt;li&gt;Authentication failure&lt;/li&gt;
&lt;li&gt;Binary log files purged on source&lt;/li&gt;
&lt;li&gt;SSL/TLS configuration mismatch&lt;/li&gt;
&lt;li&gt;Incompatible transactions&lt;/li&gt;
&lt;li&gt;DB system is in INACTIVE state&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Console Indicator&lt;/strong&gt;: Red/orange icon with &quot;Needs Attention&quot; text&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Action Required&lt;/strong&gt;: Check channel details page for error messages, resolve issue, then resume channel&lt;/p&gt;
&lt;h5 id=&quot;4-deleted&quot;&gt;4. DELETED&lt;/h5&gt;
&lt;p&gt;Channel has been permanently removed.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Characteristics&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Appears briefly before removal from list&lt;/li&gt;
&lt;li&gt;Cannot be recovered&lt;/li&gt;
&lt;li&gt;All channel configuration deleted&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;transient-states&quot;&gt;Transient States&lt;/h4&gt;
&lt;p&gt;These are temporary states during channel operations:&lt;/p&gt;
&lt;h5 id=&quot;1-creating&quot;&gt;1. CREATING&lt;/h5&gt;
&lt;p&gt;Channel is being created and configured.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Duration&lt;/strong&gt;: Typically 1-3 minutes&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Next State&lt;/strong&gt;: ACTIVE (if auto-enabled) or INACTIVE&lt;/p&gt;
&lt;h5 id=&quot;2-updating&quot;&gt;2. UPDATING&lt;/h5&gt;
&lt;p&gt;Channel is performing an update operation.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Occurs During&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Enabling or disabling channel&lt;/li&gt;
&lt;li&gt;Modifying channel configuration&lt;/li&gt;
&lt;li&gt;Resuming after error resolution&lt;/li&gt;
&lt;li&gt;DB system operations affecting channel&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Duration&lt;/strong&gt;: Typically 30 seconds to 2 minutes&lt;/p&gt;
&lt;h5 id=&quot;3-deleting&quot;&gt;3. DELETING&lt;/h5&gt;
&lt;p&gt;Channel deletion is in progress.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Duration&lt;/strong&gt;: Typically 1-2 minutes&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Next State&lt;/strong&gt;: DELETED&lt;/p&gt;
&lt;h3 id=&quot;channel-operations&quot;&gt;Channel Operations&lt;/h3&gt;
&lt;h4 id=&quot;enabling-a-channel&quot;&gt;Enabling a Channel&lt;/h4&gt;
&lt;p&gt;Starts replication from the source if no errors exist.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Console&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Navigate to Databases → HeatWave MySQL → Channels&lt;/li&gt;
&lt;li&gt;Select channel → Actions → &lt;strong&gt;Enable&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Channel transitions: INACTIVE → UPDATING → ACTIVE&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;CLI&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;oci mysql channel update \
  --channel-id &amp;lt;CHANNEL_OCID&amp;gt; \
  --is-enabled true
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;disabling-a-channel&quot;&gt;Disabling a Channel&lt;/h4&gt;
&lt;p&gt;Stops replication and puts channel into INACTIVE state.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;When to Disable&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Maintenance on source server&lt;/li&gt;
&lt;li&gt;Temporary halt of replication&lt;/li&gt;
&lt;li&gt;Troubleshooting issues&lt;/li&gt;
&lt;li&gt;Before configuration changes&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Console&lt;/strong&gt;: Channel → Actions → &lt;strong&gt;Disable&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;CLI&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;oci mysql channel update \
  --channel-id &amp;lt;CHANNEL_OCID&amp;gt; \
  --is-enabled false
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;resuming-a-channel&quot;&gt;Resuming a Channel&lt;/h4&gt;
&lt;p&gt;Restarts replication after error is resolved. Used when channel is in NEEDS_ATTENTION state.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Console&lt;/strong&gt;: Channel → Actions → &lt;strong&gt;Resume&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;CLI&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;oci mysql channel resume \
  --channel-id &amp;lt;CHANNEL_OCID&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Behavior&lt;/strong&gt;: Channel transitions to UPDATING, then ACTIVE if error resolved&lt;/p&gt;
&lt;h4 id=&quot;resetting-a-channel&quot;&gt;Resetting a Channel&lt;/h4&gt;
&lt;p&gt;Removes all replication position data except channel configuration. Channel must be INACTIVE first.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Warning&lt;/strong&gt;: Resets replication position - will re-replicate transactions&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Console&lt;/strong&gt;: Channel → Actions → &lt;strong&gt;Reset&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;CLI&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;oci mysql channel reset \
  --channel-id &amp;lt;CHANNEL_OCID&amp;gt; \
  --from-json '{&quot;resetType&quot;: &quot;POSITION&quot;}'
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Use Cases&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Recovering from corrupted replication position&lt;/li&gt;
&lt;li&gt;Starting replication from beginning&lt;/li&gt;
&lt;li&gt;After major source database changes&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;deleting-a-channel&quot;&gt;Deleting a Channel&lt;/h4&gt;
&lt;p&gt;Permanently removes channel and all associated configuration.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Console&lt;/strong&gt;: Channel details → &lt;strong&gt;Delete&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;CLI&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;oci mysql channel delete \
  --channel-id &amp;lt;CHANNEL_OCID&amp;gt; \
  --force
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;troubleshooting-inbound-replication&quot;&gt;Troubleshooting Inbound Replication&lt;/h3&gt;
&lt;h4 id=&quot;step-1-identify-source-of-failure&quot;&gt;Step 1: Identify Source of Failure&lt;/h4&gt;
&lt;p&gt;When channel enters NEEDS_ATTENTION state, determine the root cause:&lt;/p&gt;
&lt;h5 id=&quot;check-channel-details-page&quot;&gt;Check Channel Details Page&lt;/h5&gt;
&lt;ol&gt;
&lt;li&gt;Navigate to channel in console&lt;/li&gt;
&lt;li&gt;Click channel name to view details&lt;/li&gt;
&lt;li&gt;Review &lt;strong&gt;Error&lt;/strong&gt; section for messages&lt;/li&gt;
&lt;li&gt;Check &lt;strong&gt;Last Error&lt;/strong&gt; timestamp&lt;/li&gt;
&lt;li&gt;Note error code and description&lt;/li&gt;
&lt;/ol&gt;
&lt;h5 id=&quot;check-replication-status-on-replica&quot;&gt;Check Replication Status on Replica&lt;/h5&gt;
&lt;p&gt;Connect to replica DB system and query:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;SHOW REPLICA STATUS\G
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Key Fields&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Replica_IO_Running&lt;/code&gt;: Should be &quot;Yes&quot; (checks source connection)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Replica_SQL_Running&lt;/code&gt;: Should be &quot;Yes&quot; (checks transaction application)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Last_IO_Errno&lt;/code&gt;: IO thread error code&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Last_IO_Error&lt;/code&gt;: IO thread error message&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Last_SQL_Errno&lt;/code&gt;: SQL thread error code&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Last_SQL_Error&lt;/code&gt;: SQL thread error message&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Seconds_Behind_Source&lt;/code&gt;: Replication lag&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Performance Schema Query&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;SELECT * FROM performance_schema.replication_connection_status\G
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;step-2-identify-communication-failures&quot;&gt;Step 2: Identify Communication Failures&lt;/h4&gt;
&lt;p&gt;Verify connectivity between replica and source:&lt;/p&gt;
&lt;h5 id=&quot;test-network-connectivity&quot;&gt;Test Network Connectivity&lt;/h5&gt;
&lt;p&gt;From replica DB system or compute instance in same VCN:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;# Test if source is reachable
telnet &amp;lt;source_hostname&amp;gt; 3306

# Or use netcat
nc -zv &amp;lt;source_hostname&amp;gt; 3306

# Check DNS resolution
nslookup &amp;lt;source_hostname&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;test-replication-user-authentication&quot;&gt;Test Replication User Authentication&lt;/h5&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;mysql -h &amp;lt;source_hostname&amp;gt; \
      -P 3306 \
      -u &amp;lt;repl_user&amp;gt; \
      -p
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If successful, authentication works; issue is elsewhere.&lt;/p&gt;
&lt;h3 id=&quot;common-error-codes-and-solutions&quot;&gt;Common Error Codes and Solutions&lt;/h3&gt;
&lt;h4 id=&quot;error-2003-can-t-connect-to-mysql-server&quot;&gt;Error 2003: Can't Connect to MySQL Server&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Error Message&lt;/strong&gt;: &quot;Can't connect to MySQL server on '' (error_code)&quot;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Meaning&lt;/strong&gt;: Replica cannot establish network connection to source&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Common Causes&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Source MySQL server not running&lt;/li&gt;
&lt;li&gt;Firewall blocking port 3306&lt;/li&gt;
&lt;li&gt;Network path doesn't exist&lt;/li&gt;
&lt;li&gt;Wrong hostname or IP address&lt;/li&gt;
&lt;li&gt;Source server not listening on expected port&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Solutions&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Verify source is running&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;-- On source server
SHOW GLOBAL STATUS LIKE 'Uptime';
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Check firewall rules&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;# On source server (Linux)
sudo iptables -L | grep 3306

# Or for firewalld
sudo firewall-cmd --list-all | grep 3306
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Verify MySQL listening on port&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;# On source server
sudo netstat -tlnp | grep 3306
# Or
sudo ss -tlnp | grep 3306
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Check bind-address&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;-- On source server
SHOW VARIABLES LIKE 'bind_address';
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Should be &lt;code&gt;0.0.0.0&lt;/code&gt; or specific IP (not &lt;code&gt;127.0.0.1&lt;/code&gt; for remote connections)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Test from replica network&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;telnet &amp;lt;source_ip&amp;gt; 3306
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;error-1045-access-denied&quot;&gt;Error 1045: Access Denied&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Error Message&lt;/strong&gt;: &quot;Access denied for user ''@'' (using password: YES/NO)&quot;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Meaning&lt;/strong&gt;: Authentication failed - wrong credentials or user doesn't have access from replica IP&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Common Causes&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Incorrect username or password&lt;/li&gt;
&lt;li&gt;User not granted access from replica IP&lt;/li&gt;
&lt;li&gt;User exists but lacks REPLICATION SLAVE privilege&lt;/li&gt;
&lt;li&gt;Blank users on source conflicting&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Solutions&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Verify replication user exists&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;-- On source server
SELECT User, Host FROM mysql.user WHERE User = 'repl_user';
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Check user privileges&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;SHOW GRANTS FOR 'repl_user'@'%';
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Should include: &lt;code&gt;GRANT REPLICATION SLAVE ON *.*&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Verify replica IP is allowed&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;-- On source
SELECT User, Host FROM mysql.user WHERE User = 'repl_user';
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Host should be &lt;code&gt;%&lt;/code&gt;, replica subnet (e.g., &lt;code&gt;10.0.1.%&lt;/code&gt;), or specific IP&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Remove blank users&lt;/strong&gt; (common issue):&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;-- On source
SELECT User, Host FROM mysql.user WHERE User = '';
DROP USER ''@'localhost';
DROP USER ''@'&amp;lt;hostname&amp;gt;';
FLUSH PRIVILEGES;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Test authentication&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;mysql -h &amp;lt;source&amp;gt; -u repl_user -p
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;error-3159-insecure-connection&quot;&gt;Error 3159: Insecure Connection&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Error Message&lt;/strong&gt;: &quot;Connections using insecure transport are prohibited while --require_secure_transport=ON&quot;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Meaning&lt;/strong&gt;: Source requires SSL/TLS but channel not configured for it&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Solutions&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Option 1: Configure SSL in channel&lt;/strong&gt; (recommended)&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Edit channel configuration&lt;/li&gt;
&lt;li&gt;Set SSL mode to &quot;REQUIRED&quot; or higher&lt;/li&gt;
&lt;li&gt;Provide SSL certificates if using VERIFY_CA or VERIFY_IDENTITY&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Option 2: Disable require_secure_transport on source&lt;/strong&gt; (not recommended)&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;-- On source server
SET GLOBAL require_secure_transport = OFF;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Verify SSL configuration&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;-- On source
SHOW VARIABLES LIKE 'require_secure_transport';
SHOW VARIABLES LIKE 'have_ssl';
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;error-13114-binary-log-files-purged&quot;&gt;Error 13114: Binary Log Files Purged&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Error Message&lt;/strong&gt;: &quot;Got fatal error 1236 from master when reading data from binary log: 'Could not find first log file name in binary log index file'&quot; or &quot;The slave is connecting using CHANGE MASTER TO MASTER_AUTO_POSITION = 1, but the master has purged binary logs containing GTIDs that the slave requires&quot;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Meaning&lt;/strong&gt;: Binary log files needed by replica have been deleted from source&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Common Causes&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;GTID not supported or configured&lt;/li&gt;
&lt;li&gt;Binary log retention too short&lt;/li&gt;
&lt;li&gt;Long replication outage&lt;/li&gt;
&lt;li&gt;Binary logs manually purged&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Solution 1: Fix GTID-Purged (For GTID-based replication)&lt;/strong&gt;&lt;/p&gt;
&lt;h5 id=&quot;step-1-retrieve-gtid-executed-from-logical-dump&quot;&gt;Step 1: Retrieve gtid_executed from logical dump&lt;/h5&gt;
&lt;p&gt;When exporting source data with MySQL Shell:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;mysqlsh user@source -- util dump-instance /path/to/dump \
  --ocimds=true
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Capture &lt;code&gt;gtid_executed&lt;/code&gt; value from dump metadata.&lt;/p&gt;
&lt;p&gt;Or query source directly:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;-- On source
SHOW GLOBAL VARIABLES LIKE 'gtid_executed';
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;step-2-set-gtid-purged-on-replica&quot;&gt;Step 2: Set gtid_purged on replica&lt;/h5&gt;
&lt;p&gt;Connect to replica and execute:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;-- On replica
CALL sys.SET_GTID_PURGED('&amp;lt;gtid_executed_value&amp;gt;');
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;CALL sys.SET_GTID_PURGED('3E11FA47-71CA-11E1-9E33-C80AA9429562:1-5');
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;step-3-resume-channel&quot;&gt;Step 3: Resume channel&lt;/h5&gt;
&lt;p&gt;After setting gtid_purged, resume replication:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;oci mysql channel resume --channel-id &amp;lt;CHANNEL_OCID&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Solution 2: Rebuild Replication (If GTID fix fails)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;For severe cases:&lt;/p&gt;
&lt;h5 id=&quot;step-1-delete-channel-and-replica-db-system&quot;&gt;Step 1: Delete channel and replica DB system&lt;/h5&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;oci mysql channel delete --channel-id &amp;lt;CHANNEL_OCID&amp;gt; --force
oci mysql db-system delete --db-system-id &amp;lt;DB_SYSTEM_OCID&amp;gt; --force
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;step-2-take-new-snapshot-of-source&quot;&gt;Step 2: Take new snapshot of source&lt;/h5&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;mysqlsh user@source -- util dump-instance /path/to/new-dump \
  --excludeSchemas=mysql,sys,performance_schema,information_schema \
  --ocimds=true
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;step-3-create-new-db-system&quot;&gt;Step 3: Create new DB system&lt;/h5&gt;
&lt;p&gt;Create DB system and import data during creation or after.&lt;/p&gt;
&lt;h5 id=&quot;step-4-create-and-enable-channel&quot;&gt;Step 4: Create and enable channel&lt;/h5&gt;
&lt;p&gt;Create new channel with proper GTID positioning from new dump.&lt;/p&gt;
&lt;h3 id=&quot;best-practices-for-channel-management&quot;&gt;Best Practices for Channel Management&lt;/h3&gt;
&lt;h4 id=&quot;1-monitor-channel-health&quot;&gt;1. Monitor Channel Health&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Set up alerts&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Channel state changes to NEEDS_ATTENTION&lt;/li&gt;
&lt;li&gt;Replication lag exceeds threshold (e.g., 60 seconds)&lt;/li&gt;
&lt;li&gt;IO or SQL thread stops&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Regular checks&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;SHOW REPLICA STATUS\G
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;2-maintain-adequate-binary-log-retention&quot;&gt;2. Maintain Adequate Binary Log Retention&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;On source server&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;-- Set binary log expiration (seconds)
SET GLOBAL binlog_expire_logs_seconds = 172800; -- 48 hours
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;For AWS RDS&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;CALL mysql.rds_set_configuration('binlog retention hours', 48);
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;3-document-channel-configuration&quot;&gt;3. Document Channel Configuration&lt;/h4&gt;
&lt;p&gt;Maintain records of:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Source connection details&lt;/li&gt;
&lt;li&gt;Replication user credentials&lt;/li&gt;
&lt;li&gt;SSL configuration&lt;/li&gt;
&lt;li&gt;GTID settings&lt;/li&gt;
&lt;li&gt;Network paths used&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;4-test-before-production&quot;&gt;4. Test Before Production&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Create test channel in non-production&lt;/li&gt;
&lt;li&gt;Verify connectivity&lt;/li&gt;
&lt;li&gt;Test failover scenarios&lt;/li&gt;
&lt;li&gt;Document lessons learned&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;5-plan-for-maintenance-windows&quot;&gt;5. Plan for Maintenance Windows&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Before source maintenance&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Verify replication lag is minimal&lt;/li&gt;
&lt;li&gt;Optionally disable channel&lt;/li&gt;
&lt;li&gt;Perform maintenance&lt;/li&gt;
&lt;li&gt;Re-enable channel&lt;/li&gt;
&lt;li&gt;Monitor for catch-up&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&quot;6-use-gtid-when-possible&quot;&gt;6. Use GTID When Possible&lt;/h4&gt;
&lt;p&gt;Benefits:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Auto-positioning simplifies management&lt;/li&gt;
&lt;li&gt;Easier recovery from failures&lt;/li&gt;
&lt;li&gt;Better failover capabilities&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;advanced-troubleshooting&quot;&gt;Advanced Troubleshooting&lt;/h3&gt;
&lt;h4 id=&quot;replication-lag-increasing&quot;&gt;Replication Lag Increasing&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Symptoms&lt;/strong&gt;: &lt;code&gt;Seconds_Behind_Source&lt;/code&gt; continuously growing&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Diagnose&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;-- Check what's being executed
SHOW REPLICA STATUS\G

-- Check running queries on replica
SHOW PROCESSLIST;

-- Check for lock waits
SELECT * FROM sys.innodb_lock_waits;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Solutions&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Increase replica resources (upgrade shape)&lt;/li&gt;
&lt;li&gt;Optimize slow queries on source&lt;/li&gt;
&lt;li&gt;Break large transactions into smaller batches&lt;/li&gt;
&lt;li&gt;Check for long-running transactions&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&quot;channel-constantly-failing&quot;&gt;Channel Constantly Failing&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Symptoms&lt;/strong&gt;: Channel repeatedly enters NEEDS_ATTENTION&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Diagnose&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Check error patterns (same error repeating?)&lt;/li&gt;
&lt;li&gt;Review source server logs&lt;/li&gt;
&lt;li&gt;Check network stability&lt;/li&gt;
&lt;li&gt;Verify source server load&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Solutions&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Fix root cause (network, authentication, binary logs)&lt;/li&gt;
&lt;li&gt;Consider increasing connection timeouts&lt;/li&gt;
&lt;li&gt;Upgrade source server resources if overloaded&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;mysql-schema-changes-causing-failures&quot;&gt;MySQL Schema Changes Causing Failures&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Remember&lt;/strong&gt;: Changes to mysql schema are not replicated and cause replication to stop&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Solution&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Manage user accounts independently&lt;/li&gt;
&lt;li&gt;Skip problematic transaction:&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;SET GLOBAL sql_replica_skip_counter = 1;
START REPLICA;
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;Better: Avoid mysql schema changes during active replication&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Effective channel management and troubleshooting are crucial for reliable MySQL HeatWave inbound replication. By understanding channel states, recognizing common error codes, and following best practices, you can maintain healthy replication and quickly resolve issues.&lt;/p&gt;
&lt;p&gt;Key takeaways:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Monitor channel states&lt;/strong&gt;: ACTIVE, INACTIVE, NEEDS_ATTENTION are key indicators&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Check channel details&lt;/strong&gt;: Error messages provide crucial troubleshooting information&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Common errors have common fixes&lt;/strong&gt;: Network (2003), authentication (1045), SSL (3159), binary logs (13114)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use GTID&lt;/strong&gt;: Simplifies management and recovery&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Maintain binary log retention&lt;/strong&gt;: Prevent purged log issues&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Test thoroughly&lt;/strong&gt;: Validate connectivity and authentication before production&lt;/li&gt;
&lt;/ul&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://coderlegion.com/7603/mysql-heatwave-replication-channels-and-troubleshooting</guid>
<pubDate>Fri, 21 Nov 2025 16:28:02 +0000</pubDate>
</item>
<item>
<title>MySQL HeatWave: Replicating to DB System (Inbound Replication)</title>
<link>https://coderlegion.com/7467/mysql-heatwave-replicating-to-db-system-inbound-replication</link>
<description>&lt;p&gt;Inbound replication enables data replication from external MySQL sources into HeatWave DB systems, supporting migrations, disaster recovery, and hybrid cloud architectures.&lt;/p&gt;
&lt;h3 id=&quot;what-is-inbound-replication-&quot;&gt;What is Inbound Replication?&lt;/h3&gt;
&lt;p&gt;Uses a replication channel to copy transactions from a MySQL source to a HeatWave DB system replica.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Key Characteristics:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Asynchronous&lt;/strong&gt;: Replicas don't need permanent connection; can reconnect to receive updates&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Single Source&lt;/strong&gt;: One source per replica (multi-source not supported)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Source Independence&lt;/strong&gt;: Source doesn't control replica; replica connects using replication credentials&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Not Managed&lt;/strong&gt;: You configure and maintain the channel and network connectivity&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;supported-scenarios&quot;&gt;Supported Scenarios&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;On-Premises to DB System&lt;/strong&gt;: Cloud migrations, hybrid architectures, disaster recovery&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cloud Compute to DB System&lt;/strong&gt;: Cross-cloud replication, migrating self-managed to HeatWave&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;DB System to DB System&lt;/strong&gt;: Cross-region replication, geographic redundancy&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;replication-architecture&quot;&gt;Replication Architecture&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Source Database:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;MySQL 5.7+ (on-premises, OCI compute, HeatWave DB System, or other clouds)&lt;/li&gt;
&lt;li&gt;Binary logging enabled&lt;/li&gt;
&lt;li&gt;Row-based replication format&lt;/li&gt;
&lt;li&gt;GTID mode enabled (recommended)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Replica Database:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;MySQL HeatWave DB System in private subnet&lt;/li&gt;
&lt;li&gt;Applies transactions from source asynchronously&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Flow:&lt;/strong&gt; Source commits to binary log → Channel retrieves transactions → Replica receives and applies&lt;/p&gt;
&lt;h3 id=&quot;limitations&quot;&gt;Limitations&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Row-Based Only&lt;/strong&gt;: Statement-based and mixed replication not supported&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Asynchronous Only&lt;/strong&gt;: Semi-synchronous not supported&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Single Source&lt;/strong&gt;: Multi-source replication not supported&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;MySQL Schema Not Replicated&lt;/strong&gt;: User/privilege changes don't replicate; manage separately&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;GTID Tags&lt;/strong&gt;: Pre-May 2024 systems need upgrade for GTID tag support&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Applier Privileges&lt;/strong&gt;: Replication fails if applier lacks privileges for statements&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;HeatWave Cluster&lt;/strong&gt;: ALTER TABLE SECONDARY_LOAD/UNLOAD don't affect target cluster&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;High Availability&lt;/strong&gt;: Channel suspends during HA upgrades, resumes after completion&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;prerequisites&quot;&gt;Prerequisites&lt;/h3&gt;
&lt;h4 id=&quot;source-requirements&quot;&gt;Source Requirements&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;1. Enable GTID (Recommended):&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;SET GLOBAL enforce_gtid_consistency = ON;
SET GLOBAL gtid_mode = OFF_PERMISSIVE;
SET GLOBAL gtid_mode = ON_PERMISSIVE;
SET GLOBAL gtid_mode = ON;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;2. Enable Binary Logging:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;SET GLOBAL log_bin = ON;
SET GLOBAL binlog_format = 'ROW';
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;3. Extend Binary Log Retention:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;-- For AWS RDS:
CALL mysql.rds_set_configuration('binlog retention hours', 24);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;4. Create Replication User:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;CREATE USER 'repl_user'@'%' 
  IDENTIFIED BY 'StrongPassword123!' 
  REQUIRE SSL;
GRANT REPLICATION SLAVE ON *.* TO 'repl_user'@'%';
FLUSH PRIVILEGES;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;5. Network Connectivity&lt;/strong&gt;: Allow replica access to source MySQL port (3306) with SSL/TLS&lt;/p&gt;
&lt;h4 id=&quot;replica-requirements&quot;&gt;Replica Requirements&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;Active HeatWave DB system&lt;/li&gt;
&lt;li&gt;Network path to source (VPN, FastConnect, PrivateLink)&lt;/li&gt;
&lt;li&gt;Matching &lt;code&gt;lower_case_table_names&lt;/code&gt; value with source&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;connectivity-options&quot;&gt;Connectivity Options&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;On-Premises to HeatWave:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;FastConnect&lt;/strong&gt;: Up to 10 Gbps, low latency, production workloads&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Site-to-Site VPN&lt;/strong&gt;: 250 Mbps per tunnel, cost-effective, dev/test&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Cloud to HeatWave:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;AWS: PrivateLink or VPN&lt;/li&gt;
&lt;li&gt;Azure: OCI-Azure interconnect or VPN&lt;/li&gt;
&lt;li&gt;GCP: Partner Interconnect or VPN&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;dedicated-replication-user-benefits&quot;&gt;Dedicated Replication User Benefits&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Minimum Privileges&lt;/strong&gt;: Grant only REPLICATION SLAVE&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Restrict Host&lt;/strong&gt;: Limit to replica IP/subnet&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Enforce Encryption&lt;/strong&gt;: Use REQUIRE SSL&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Example:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;CREATE USER 'repl_user'@'10.0.1.%' 
  IDENTIFIED BY 'SecurePassword!' 
  REQUIRE SSL;
GRANT REPLICATION SLAVE ON *.* TO 'repl_user'@'10.0.1.%';
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;loading-initial-data&quot;&gt;Loading Initial Data&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Export from Source:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;mysqlsh user@source_host:3306 -- util dump-instance /path/to/dump \
  --excludeSchemas=mysql,sys,performance_schema,information_schema \
  --ocimds=true
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Import to Replica:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;mysqlsh admin@replica_host:3306 -- util load-dump /path/to/dump \
  --progressFile=/path/to/progress.json
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;creating-replication-channel&quot;&gt;Creating Replication Channel&lt;/h3&gt;
&lt;h4 id=&quot;using-oci-console&quot;&gt;Using OCI Console&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;Navigate to DB System → Resources → Channels&lt;/li&gt;
&lt;li&gt;Click Create channel&lt;/li&gt;
&lt;li&gt;Configure settings (source hostname, port, credentials, SSL mode)&lt;/li&gt;
&lt;li&gt;Click Create&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&quot;using-oci-cli&quot;&gt;Using OCI CLI&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;oci mysql channel create-from-mysql --generate-full-command-json-input &amp;gt; channel-config.json
# Edit channel-config.json with your settings
oci mysql channel create-from-mysql --from-json file://channel-config.json
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;positioning-options&quot;&gt;Positioning Options&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;GTID Auto-Positioning (Recommended):&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Automatic transaction tracking&lt;/li&gt;
&lt;li&gt;No manual position needed&lt;/li&gt;
&lt;li&gt;Requires &lt;code&gt;gtid_mode=ON&lt;/code&gt; on source&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Binary Log Positioning:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;-- Get position on source:
SHOW MASTER STATUS;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Use File and Position values when creating channel&lt;/p&gt;
&lt;h3 id=&quot;managing-channels&quot;&gt;Managing Channels&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Start:&lt;/strong&gt; &lt;code&gt;oci mysql channel update --channel-id &amp;lt;ID&amp;gt; --is-enabled true&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Stop:&lt;/strong&gt; &lt;code&gt;oci mysql channel update --channel-id &amp;lt;ID&amp;gt; --is-enabled false&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Reset:&lt;/strong&gt; &lt;code&gt;oci mysql channel reset --channel-id &amp;lt;ID&amp;gt; --from-json '{&quot;resetType&quot;: &quot;POSITION&quot;}'&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Delete:&lt;/strong&gt; &lt;code&gt;oci mysql channel delete --channel-id &amp;lt;ID&amp;gt; --force&lt;/code&gt;&lt;/p&gt;
&lt;h3 id=&quot;monitoring-replication-1&quot;&gt;Monitoring Replication&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;Check Status:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;SHOW REPLICA STATUS\G
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Key Metrics:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Replica_IO_Running&lt;/code&gt;: Should be &quot;Yes&quot;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Replica_SQL_Running&lt;/code&gt;: Should be &quot;Yes&quot;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Seconds_Behind_Source&lt;/code&gt;: Replication lag&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Last_Error&lt;/code&gt;: Error messages&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Channel States:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;ACTIVE: Running normally&lt;/li&gt;
&lt;li&gt;NEEDS_ATTENTION: Requires intervention&lt;/li&gt;
&lt;li&gt;INACTIVE: Stopped&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;best-practices-1&quot;&gt;Best Practices&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Enable GTID&lt;/strong&gt;: Simplifies management&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use SSL/TLS&lt;/strong&gt;: Encrypt replication traffic&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monitor Lag&lt;/strong&gt;: Alert on &amp;gt;60 seconds lag&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Test Failover&lt;/strong&gt;: Regular failover testing&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Binary Log Retention&lt;/strong&gt;: 24-48 hours recommended&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Health Checks&lt;/strong&gt;: Automate monitoring&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Gradual Migration&lt;/strong&gt;: Phased approach for migrations&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;troubleshooting&quot;&gt;Troubleshooting&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;NEEDS_ATTENTION State:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Check error logs in channel details&lt;/li&gt;
&lt;li&gt;Verify connectivity and credentials&lt;/li&gt;
&lt;li&gt;Confirm SSL configuration and firewall rules&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Increasing Lag:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Increase replica resources&lt;/li&gt;
&lt;li&gt;Check network bandwidth&lt;/li&gt;
&lt;li&gt;Optimize source queries&lt;/li&gt;
&lt;li&gt;Break large transactions&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;MySQL Schema Errors:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Manage users independently on replica&lt;/li&gt;
&lt;li&gt;Avoid mysql schema changes during replication&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;SSL Failures:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Verify source SSL enabled&lt;/li&gt;
&lt;li&gt;Use &quot;REQUIRED&quot; mode&lt;/li&gt;
&lt;li&gt;Check certificate validity&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;key-takeaways&quot;&gt;Key Takeaways&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Asynchronous replication tolerates disconnections&lt;/li&gt;
&lt;li&gt;Use GTID mode for simplified management&lt;/li&gt;
&lt;li&gt;Always encrypt replication traffic&lt;/li&gt;
&lt;li&gt;Monitor lag, errors, and channel health continuously&lt;/li&gt;
&lt;li&gt;Understand limitations: row-based only, single source, mysql schema restrictions&lt;/li&gt;
&lt;li&gt;Test thoroughly before production cutover&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Inbound replication provides flexible, reliable data migration and hybrid cloud capabilities for MySQL HeatWave workloads.&lt;/p&gt;
&lt;h3 id=&quot;additional-resources&quot;&gt;Additional Resources&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.oracle.com/en-us/iaas/mysql-database/doc/replication.html&quot;&gt;MySQL HeatWave Inbound Replication Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.oracle.com/en-us/iaas/mysql-database/doc/configuring-source-server.html&quot;&gt;Source Configuration Guide&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.oracle.com/en-us/iaas/mysql-database/doc/creating-replication-channel.html&quot;&gt;Creating a Replication Channel&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.oracle.com/en-us/iaas/mysql-database/&quot;&gt;MySQL HeatWave Service Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.oracle.com/en-us/iaas/database-management/&quot;&gt;OCI Database Management&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://coderlegion.com/7467/mysql-heatwave-replicating-to-db-system-inbound-replication</guid>
<pubDate>Tue, 18 Nov 2025 09:39:47 +0000</pubDate>
</item>
</channel>
</rss>