<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Coder Legion - Recent posts tagged mysql-heatwave</title>
<link>https://coderlegion.com/tag/mysql-heatwave</link>
<description>Powered by Question2Answer</description>
<item>
<title>MySQL HeatWave: Read Replicas for Scaling Read-Heavy Workloads</title>
<link>https://coderlegion.com/7889/mysql-heatwave-read-replicas-for-scaling-read-heavy-workloads</link>
<description>&lt;p&gt;Read replicas are a powerful feature of MySQL HeatWave that enable you to scale read-heavy workloads by distributing queries across multiple database instances. As read-only copies of your source DB system, read replicas handle SELECT queries, analytics, and reporting workloads while the primary instance handles write operations. This architecture improves application performance, enhances availability, and supports disaster recovery strategies.&lt;/p&gt;
&lt;p&gt;This guide covers read replica concepts, creation, connectivity, use cases, maintenance, and limitations.&lt;/p&gt;
&lt;h3 id=&quot;what-are-read-replicas-&quot;&gt;What Are Read Replicas?&lt;/h3&gt;
&lt;p&gt;Read replicas are read-only copies of a MySQL HeatWave DB system that are automatically updated using asynchronous replication from the source DB system.&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;Read-only&lt;/strong&gt;: Cannot execute write operations (INSERT, UPDATE, DELETE)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Asynchronous replication&lt;/strong&gt;: Data replicated from source with minimal lag&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Full data copy&lt;/strong&gt;: Contains complete copy of source DB system data&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Independent endpoints&lt;/strong&gt;: Each read replica has its own connection endpoint&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Automatic lifecycle&lt;/strong&gt;: Started, stopped, and deleted with source DB system&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;benefits-of-read-replicas&quot;&gt;Benefits of Read Replicas&lt;/h3&gt;
&lt;h4 id=&quot;1-redirecting-excess-traffic&quot;&gt;1. Redirecting Excess Traffic&lt;/h4&gt;
&lt;p&gt;Distribute read traffic across multiple instances to prevent primary instance overload.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Scenario&lt;/strong&gt;: E-commerce application during peak shopping season&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Primary handles transactions (orders, payments)&lt;/li&gt;
&lt;li&gt;Read replicas serve product catalogs, inventory checks, search queries&lt;/li&gt;
&lt;li&gt;Reduces primary instance load by 60-80%&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;2-business-reporting-and-analytics&quot;&gt;2. Business Reporting and Analytics&lt;/h4&gt;
&lt;p&gt;Offload resource-intensive reporting queries to read replicas.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Scenario&lt;/strong&gt;: Daily business intelligence reports&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Complex JOIN queries with aggregations&lt;/li&gt;
&lt;li&gt;Historical data analysis&lt;/li&gt;
&lt;li&gt;Real-time dashboards&lt;/li&gt;
&lt;li&gt;No impact on transactional performance&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;3-geographic-distribution&quot;&gt;3. Geographic Distribution&lt;/h4&gt;
&lt;p&gt;Place read replicas closer to users in different regions.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Scenario&lt;/strong&gt;: Global application&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Primary in US-East&lt;/li&gt;
&lt;li&gt;Read replica in EU-West for European users&lt;/li&gt;
&lt;li&gt;Read replica in AP-South for Asian users&lt;/li&gt;
&lt;li&gt;Reduced latency for read operations&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;4-disaster-recovery&quot;&gt;4. Disaster Recovery&lt;/h4&gt;
&lt;p&gt;Read replicas serve as standby databases for failover scenarios.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Scenario&lt;/strong&gt;: Primary DB system failure&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Promote read replica to standalone DB system&lt;/li&gt;
&lt;li&gt;Minimal data loss (replication lag only)&lt;/li&gt;
&lt;li&gt;Faster recovery than backup restoration&lt;/li&gt;
&lt;li&gt;Business continuity maintained&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;5-development-and-testing&quot;&gt;5. Development and Testing&lt;/h4&gt;
&lt;p&gt;Create isolated environments without impacting production.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Scenario&lt;/strong&gt;: Testing new features&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Read replica mirrors production data&lt;/li&gt;
&lt;li&gt;Safe environment for experiments&lt;/li&gt;
&lt;li&gt;No risk to production workload&lt;/li&gt;
&lt;li&gt;Fresh data for realistic testing&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;creating-read-replicas&quot;&gt;Creating Read Replicas&lt;/h3&gt;
&lt;h4 id=&quot;prerequisites&quot;&gt;Prerequisites&lt;/h4&gt;
&lt;p&gt;Before creating read replicas, ensure the following requirements are met:&lt;/p&gt;
&lt;h5 id=&quot;1-oci-user-accounts-with-required-privileges&quot;&gt;1. OCI User Accounts with Required Privileges&lt;/h5&gt;
&lt;p&gt;Your OCI user must have permissions to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Create and manage read replicas&lt;/li&gt;
&lt;li&gt;Access the source DB system&lt;/li&gt;
&lt;li&gt;Manage network resources&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Required IAM Policy&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Allow group DatabaseAdmins to manage mysql-family in compartment ProductionDatabases
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;2-operational-db-system&quot;&gt;2. Operational DB System&lt;/h5&gt;
&lt;p&gt;An active MySQL HeatWave DB system must exist and be in ACTIVE state. You can create read replicas on standalone or high availability DB systems.&lt;/p&gt;
&lt;h5 id=&quot;3-compatible-shape&quot;&gt;3. Compatible Shape&lt;/h5&gt;
&lt;p&gt;Read replicas are not supported on shapes that have less than 8 ECPUs or less than 4 OCPUs.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Supported Shapes&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;ECPU&lt;/strong&gt;: MySQL.8 (8 ECPUs), MySQL.16, MySQL.32, MySQL.64, MySQL.128, MySQL.256&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;OCPU&lt;/strong&gt; (deprecated): MySQL.VM.Standard.E3.1.8GB (4 OCPUs) and higher&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: OCPU shapes are deprecated for new users after September 5, 2024, and will be unavailable after March 13, 2026.&lt;/p&gt;
&lt;h5 id=&quot;4-network-configuration&quot;&gt;4. Network Configuration&lt;/h5&gt;
&lt;p&gt;Read replicas inherit the VCN and subnet from the source DB system by default, but you can specify a different subnet in the same VCN or different VCN.&lt;/p&gt;
&lt;h4 id=&quot;maximum-read-replicas&quot;&gt;Maximum Read Replicas&lt;/h4&gt;
&lt;p&gt;You can create a maximum of 18 read replicas per DB system. Each read replica has its own endpoint for connections.&lt;/p&gt;
&lt;h4 id=&quot;creating-read-replicas-via-oci-console&quot;&gt;Creating Read Replicas via OCI Console&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Navigate to DB System&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Open OCI Console&lt;/li&gt;
&lt;li&gt;Go to Databases → HeatWave MySQL → DB Systems&lt;/li&gt;
&lt;li&gt;Select your source DB system&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Access Read Replicas Section&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Under Resources, click &lt;strong&gt;Read replicas&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Create read replica&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Configure Read Replica&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Display name&lt;/strong&gt;: Descriptive name (e.g., &quot;prod-analytics-replica&quot;)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Description&lt;/strong&gt;: Purpose description&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Shape&lt;/strong&gt;: Inherit from source or override with different shape&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Configuration&lt;/strong&gt;: Inherit from source or select custom configuration&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;MySQL version&lt;/strong&gt;: Inherit or override (must be same or higher)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Networking&lt;/strong&gt;: Select VCN and subnet (can differ from source)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Delete protection&lt;/strong&gt;: Enable to prevent accidental deletion&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Review and Create&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Click &lt;strong&gt;Create read replica&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Read replica enters CREATING state&lt;/li&gt;
&lt;li&gt;Typically available in 15-30 minutes&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&quot;creating-read-replicas-via-oci-cli&quot;&gt;Creating Read Replicas via OCI CLI&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Generate configuration template&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;oci mysql replica create --generate-full-command-json-input &amp;gt; replica-config.json
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Edit configuration&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-json&quot;&gt;{
  &quot;dbSystemId&quot;: &quot;ocid1.mysqldbsystem.oc1...&quot;,
  &quot;displayName&quot;: &quot;analytics-read-replica&quot;,
  &quot;description&quot;: &quot;Read replica for BI workloads&quot;,
  &quot;shapeName&quot;: &quot;MySQL.16&quot;,
  &quot;isDeleteProtected&quot;: true,
  &quot;waitForState&quot;: [&quot;SUCCEEDED&quot;]
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Create replica&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;oci mysql replica create --from-json file://replica-config.json
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;read-replica-properties&quot;&gt;Read Replica Properties&lt;/h3&gt;
&lt;h4 id=&quot;inherited-vs-overridden-properties&quot;&gt;Inherited vs. Overridden Properties&lt;/h4&gt;
&lt;p&gt;By default, a read replica inherits shape, configuration, and version from the DB system. You can override these properties.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;When Inherited&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Changing property on DB system also changes it on read replica&lt;/li&gt;
&lt;li&gt;Replica follows source configuration automatically&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;When Overridden&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Changing property on DB system does NOT affect read replica&lt;/li&gt;
&lt;li&gt;Replica maintains independent configuration&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Overridable Properties&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Shape (e.g., use larger shape for heavy analytics)&lt;/li&gt;
&lt;li&gt;Configuration (e.g., tune for read-heavy workload)&lt;/li&gt;
&lt;li&gt;MySQL version (must be same or higher than source)&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;automatic-read-replica-load-balancer&quot;&gt;Automatic Read Replica Load Balancer&lt;/h4&gt;
&lt;p&gt;When you create the first read replica of a DB system, a read replica load balancer is created automatically, which distributes read traffic among the read replicas.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Load Balancer Features&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Distributes queries across all read replicas&lt;/li&gt;
&lt;li&gt;Health checks ensure traffic goes to ACTIVE replicas&lt;/li&gt;
&lt;li&gt;Automatic failover if replica becomes unavailable&lt;/li&gt;
&lt;li&gt;No manual configuration required&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;connecting-to-read-replicas&quot;&gt;Connecting to Read Replicas&lt;/h3&gt;
&lt;p&gt;Client applications cannot directly access read replicas from the internet. Connection methods mirror those for DB systems.&lt;/p&gt;
&lt;h4 id=&quot;connection-methods&quot;&gt;Connection Methods&lt;/h4&gt;
&lt;h5 id=&quot;1-load-balancer-recommended-&quot;&gt;1. Load Balancer (Recommended)&lt;/h5&gt;
&lt;p&gt;Use the automatically created read replica load balancer for balanced traffic distribution.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Load Balancer Endpoint&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;lt;replica-load-balancer-ip&amp;gt;:3306
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Benefits&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Automatic distribution across replicas&lt;/li&gt;
&lt;li&gt;Health checks&lt;/li&gt;
&lt;li&gt;Simplified application configuration&lt;/li&gt;
&lt;li&gt;High availability&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Important&lt;/strong&gt;: When connecting via load balancer, user accounts require username only (no hostname restriction like 'user'@'%').&lt;/p&gt;
&lt;h5 id=&quot;2-bastion-session&quot;&gt;2. Bastion Session&lt;/h5&gt;
&lt;p&gt;Provides restricted and time-limited secure access.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Use Case&lt;/strong&gt;: Temporary administrative access, troubleshooting&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Setup&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create bastion session in OCI Console&lt;/li&gt;
&lt;li&gt;Session provides temporary SSH access&lt;/li&gt;
&lt;li&gt;Connect to read replica from bastion&lt;/li&gt;
&lt;li&gt;Session expires after defined period (30 minutes to 3 hours)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;# Create bastion session
oci bastion session create-managed-ssh ...

# Connect through bastion
ssh -i &amp;lt;private_key&amp;gt; -o ProxyCommand=&quot;ssh -W %h:%p ...&quot; replica_ip
mysql -h &amp;lt;REPLICA_IP&amp;gt; -u admin -p
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;3-compute-instance&quot;&gt;3. Compute Instance&lt;/h5&gt;
&lt;p&gt;For long-term, secure access.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Setup&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create compute instance in same VCN&lt;/li&gt;
&lt;li&gt;Configure security lists to allow MySQL ports&lt;/li&gt;
&lt;li&gt;Install MySQL client on compute instance&lt;/li&gt;
&lt;li&gt;Connect to read replica endpoint&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;mysql -h &amp;lt;REPLICA_IP&amp;gt; -P 3306 -u admin -p
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;4-vpn-connection&quot;&gt;4. VPN Connection&lt;/h5&gt;
&lt;p&gt;For site-to-site connectivity from on-premises.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Options&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Site-to-Site VPN&lt;/strong&gt;: IPSec VPN over internet&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;FastConnect&lt;/strong&gt;: Dedicated private connection&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;OpenVPN&lt;/strong&gt;: Client VPN access&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id=&quot;5-direct-application-connection&quot;&gt;5. Direct Application Connection&lt;/h5&gt;
&lt;p&gt;Configure application to use read replica endpoints.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Application Configuration&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;# Primary for writes
primary_connection = mysql.connector.connect(
    host='primary_db_ip',
    user='app_user',
    password='password',
    database='production'
)

# Read replica for reads
replica_connection = mysql.connector.connect(
    host='replica_ip',
    user='app_user',
    password='password',
    database='production'
)

# Write operation
primary_connection.cursor().execute(&quot;INSERT INTO orders ...&quot;)

# Read operation
replica_connection.cursor().execute(&quot;SELECT * FROM products&quot;)
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;monitoring-read-replicas&quot;&gt;Monitoring Read Replicas&lt;/h3&gt;
&lt;h4 id=&quot;read-replica-lag&quot;&gt;Read Replica Lag&lt;/h4&gt;
&lt;p&gt;Read replica lag measures how far behind the replica is from the source, measured by the read replica lag metric.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Factors Affecting Lag&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Workload on each read replica&lt;/li&gt;
&lt;li&gt;CPU and memory resources&lt;/li&gt;
&lt;li&gt;Network latency&lt;/li&gt;
&lt;li&gt;Volume of writes on primary&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Monitoring Lag&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;-- On read replica
SHOW REPLICA STATUS\G
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Check &lt;code&gt;Seconds_Behind_Source&lt;/code&gt; value.&lt;/p&gt;
&lt;h4 id=&quot;creating-alarms&quot;&gt;Creating Alarms&lt;/h4&gt;
&lt;p&gt;Set up OCI alarms to monitor read replica health:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Navigate to Monitoring service&lt;/li&gt;
&lt;li&gt;Create alarm for &lt;code&gt;ReplicaLag&lt;/code&gt; metric&lt;/li&gt;
&lt;li&gt;Set threshold (e.g., &amp;gt; 60 seconds)&lt;/li&gt;
&lt;li&gt;Configure notification topic&lt;/li&gt;
&lt;li&gt;Add email or webhook destination&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Alarm Query&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ReplicaLag[1m]{resourceDisplayName = &quot;analytics-replica&quot;}.mean() &amp;gt; 60
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;automatic-recovery&quot;&gt;Automatic Recovery&lt;/h4&gt;
&lt;p&gt;MySQL HeatWave Service performs automatic recovery on any read replica that has failed.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Recovery Process&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Failure detected&lt;/li&gt;
&lt;li&gt;Read replica set to UPDATING state&lt;/li&gt;
&lt;li&gt;Cannot accept client connections during recovery&lt;/li&gt;
&lt;li&gt;After success, set to ACTIVE state&lt;/li&gt;
&lt;li&gt;Becomes operational again&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Failed Beyond Recovery&lt;/strong&gt;:&lt;br&gt;
If replica cannot replicate from DB system anymore, it's set to NEEDS_ATTENTION state. Manual intervention required.&lt;/p&gt;
&lt;h3 id=&quot;read-replica-maintenance-and-upgrades&quot;&gt;Read Replica Maintenance and Upgrades&lt;/h3&gt;
&lt;h4 id=&quot;standalone-db-system-upgrades&quot;&gt;Standalone DB System Upgrades&lt;/h4&gt;
&lt;p&gt;Read replicas are upgraded in parallel with source DB system. Both the source and all read replicas go offline for an update and upgrade at the same time.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Process&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Maintenance window starts&lt;/li&gt;
&lt;li&gt;Source and all replicas enter UPDATING state&lt;/li&gt;
&lt;li&gt;Upgrades applied simultaneously&lt;/li&gt;
&lt;li&gt;All return to ACTIVE state together&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Downtime&lt;/strong&gt;: Brief period (typically 5-15 minutes depending on upgrade type)&lt;/p&gt;
&lt;h4 id=&quot;high-availability-db-system-upgrades&quot;&gt;High Availability DB System Upgrades&lt;/h4&gt;
&lt;p&gt;For HA DB systems, read replicas are upgraded one by one using rolling maintenance process. Only one read replica goes offline at a time.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Rolling Upgrade Process&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Replica 1 enters UPDATING state&lt;/li&gt;
&lt;li&gt;Replica 1 upgraded, returns to ACTIVE&lt;/li&gt;
&lt;li&gt;Replica 2 enters UPDATING state&lt;/li&gt;
&lt;li&gt;Replica 2 upgraded, returns to ACTIVE&lt;/li&gt;
&lt;li&gt;Continue for all replicas&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Benefits&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Minimal impact on read capacity&lt;/li&gt;
&lt;li&gt;At least N-1 replicas always available&lt;/li&gt;
&lt;li&gt;Reduced performance impact&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Duration&lt;/strong&gt;: Longer total time but better availability&lt;/p&gt;
&lt;h3 id=&quot;read-replica-limitations&quot;&gt;Read Replica Limitations&lt;/h3&gt;
&lt;h4 id=&quot;1-shape-requirements&quot;&gt;1. Shape Requirements&lt;/h4&gt;
&lt;p&gt;Read replicas are not supported on shapes that have less than 8 ECPUs or less than 4 OCPUs.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Unsupported&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;MySQL.2 (2 ECPUs)&lt;/li&gt;
&lt;li&gt;MySQL.4 (4 ECPUs)&lt;/li&gt;
&lt;li&gt;MySQL.VM.Standard.E3.1.8GB (1 OCPU)&lt;/li&gt;
&lt;li&gt;MySQL.VM.Standard.E3.1.16GB (2 OCPUs)&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;2-load-balancer-account-name-restrictions&quot;&gt;2. Load Balancer Account Name Restrictions&lt;/h4&gt;
&lt;p&gt;When connecting via load balancer, user accounts require username only ('user'@'%'), not hostname-specific restrictions.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Won't Work&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;CREATE USER 'app_user'@'10.0.1.%' ...
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Must Use&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;CREATE USER 'app_user'@'%' ...
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;3-outbound-replication-source&quot;&gt;3. Outbound Replication Source&lt;/h4&gt;
&lt;p&gt;Read replicas cannot be configured as a source for outbound replication. Only the primary DB system can be a replication source.&lt;/p&gt;
&lt;h4 id=&quot;4-ipv4-subnet-support-only&quot;&gt;4. IPv4 Subnet Support Only&lt;/h4&gt;
&lt;p&gt;Read replicas are only supported with IPv4 subnets. IPv6 subnets are not supported.&lt;/p&gt;
&lt;h4 id=&quot;5-bandwidth-limits&quot;&gt;5. Bandwidth Limits&lt;/h4&gt;
&lt;p&gt;Read replicas support up to 8 Gbps bandwidth for client connections.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Implications&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;High-throughput workloads may hit bandwidth limits&lt;/li&gt;
&lt;li&gt;Monitor network metrics&lt;/li&gt;
&lt;li&gt;Consider multiple replicas for very high throughput needs&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;6-lifecycle-dependency&quot;&gt;6. Lifecycle Dependency&lt;/h4&gt;
&lt;p&gt;Read replicas are started when DB system is started, stopped when DB system is stopped, and deleted when DB system is deleted.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cannot&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Start replica independently if source is stopped&lt;/li&gt;
&lt;li&gt;Keep replica running when source is stopped&lt;/li&gt;
&lt;li&gt;Preserve replica after deleting source&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;7-heatwave-cluster-not-supported&quot;&gt;7. HeatWave Cluster Not Supported&lt;/h4&gt;
&lt;p&gt;Read replicas cannot have HeatWave clusters attached. If the source DB system has a HeatWave cluster, read replicas will not replicate HeatWave-specific data.&lt;/p&gt;
&lt;h4 id=&quot;8-configuration-changes&quot;&gt;8. Configuration Changes&lt;/h4&gt;
&lt;p&gt;Prior to March 2024, configuration changes required deleting and recreating read replicas. As of March 26, 2024, you can now change shape and configuration of DB systems with read replicas without deleting replicas.&lt;/p&gt;
&lt;h3 id=&quot;best-practices&quot;&gt;Best Practices&lt;/h3&gt;
&lt;h4 id=&quot;1-use-multiple-read-replicas&quot;&gt;1. Use Multiple Read Replicas&lt;/h4&gt;
&lt;p&gt;For high availability and load distribution:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Minimum 2 replicas for redundancy&lt;/li&gt;
&lt;li&gt;More replicas for higher read throughput&lt;/li&gt;
&lt;li&gt;Maximum 18 replicas per DB system&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;2-monitor-replication-lag&quot;&gt;2. Monitor Replication Lag&lt;/h4&gt;
&lt;p&gt;Set up alerts and regularly check:&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;If lag exceeds 60 seconds consistently:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Increase replica shape&lt;/li&gt;
&lt;li&gt;Reduce read load&lt;/li&gt;
&lt;li&gt;Optimize slow queries&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;3-size-replicas-appropriately&quot;&gt;3. Size Replicas Appropriately&lt;/h4&gt;
&lt;p&gt;Match replica shape to workload:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Light analytics: Same shape as source&lt;/li&gt;
&lt;li&gt;Heavy reporting: Larger shape than source&lt;/li&gt;
&lt;li&gt;Mixed workload: Multiple replicas with different shapes&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;4-implement-read-write-splitting-in-applications&quot;&gt;4. Implement Read/Write Splitting in Applications&lt;/h4&gt;
&lt;p&gt;Direct writes to primary, reads to replicas:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;def ex# Conclusionecute_query(query):
    if query.startswith('SELECT'):
        return replica_connection.execute(query)
    else:
        return primary_connection.execute(query)
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;5-use-load-balancer-for-simplicity&quot;&gt;5. Use Load Balancer for Simplicity&lt;/h4&gt;
&lt;p&gt;Automatic distribution and failover:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Configure application with load balancer endpoint only&lt;/li&gt;
&lt;li&gt;No application changes when adding/removing replicas&lt;/li&gt;
&lt;li&gt;Built-in health checks&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;6-plan-for-replication-lag&quot;&gt;6. Plan for Replication Lag&lt;/h4&gt;
&lt;p&gt;Design applications to tolerate eventual consistency:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Don't read immediately after write from replica&lt;/li&gt;
&lt;li&gt;Use primary for read-after-write scenarios&lt;/li&gt;
&lt;li&gt;Communicate lag tolerance to users&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;7-test-failover-scenarios&quot;&gt;7. Test Failover Scenarios&lt;/h4&gt;
&lt;p&gt;Regularly test promoting replica to standalone:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Verify promotion procedure&lt;/li&gt;
&lt;li&gt;Measure recovery time&lt;/li&gt;
&lt;li&gt;Update application connection strings&lt;/li&gt;
&lt;li&gt;Practice makes perfect for real disasters&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;8-enable-delete-protection&quot;&gt;8. Enable Delete Protection&lt;/h4&gt;
&lt;p&gt;For production replicas:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;--is-delete-protected true
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Prevents accidental deletion.&lt;/p&gt;
&lt;p&gt;Read replicas are essential for scaling MySQL HeatWave beyond single-instance limitations. By distributing read traffic across multiple instances, you improve application performance, support business analytics, enable geographic distribution, and enhance disaster recovery capabilities.&lt;/p&gt;
&lt;p&gt;Key takeaways:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Asynchronous replication&lt;/strong&gt;: Data replicated with minimal lag&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;18 replicas maximum&lt;/strong&gt;: Scale read capacity significantly&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Shape requirement&lt;/strong&gt;: Minimum 8 ECPUs or 4 OCPUs&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Automatic load balancer&lt;/strong&gt;: Simplifies traffic distribution&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Multiple connection methods&lt;/strong&gt;: Bastion, compute, VPN, load balancer&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Rolling upgrades for HA&lt;/strong&gt;: Minimal downtime during maintenance&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monitor lag&lt;/strong&gt;: Critical for maintaining data freshness&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Disaster recovery&lt;/strong&gt;: Promote replica to standalone if needed&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Whether supporting global applications, offloading analytics, or implementing disaster recovery, MySQL HeatWave read replicas provide the scalability and flexibility needed for modern database architectures.&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://coderlegion.com/7889/mysql-heatwave-read-replicas-for-scaling-read-heavy-workloads</guid>
<pubDate>Fri, 28 Nov 2025 08:11:25 +0000</pubDate>
</item>
<item>
<title>MySQL HeatWave: Migrating Your Data to HeatWave Service</title>
<link>https://coderlegion.com/7832/mysql-heatwave-migrating-your-data-to-heatwave-service</link>
<description>&lt;p&gt;Migrating data to MySQL HeatWave is a critical step in leveraging the cloud's power for your database workloads. MySQL Shell dump utilities provide the recommended method for exporting data from source MySQL databases and importing them into HeatWave DB systems. These utilities offer HeatWave-specific compatibility checks, parallel processing, and automatic modifications to ensure smooth migrations.&lt;/p&gt;
&lt;p&gt;This guide covers dump utilities, compatibility checks, and best practices for successful data migration to MySQL HeatWave.&lt;/p&gt;
&lt;h3 id=&quot;understanding-data-migration&quot;&gt;Understanding Data Migration&lt;/h3&gt;
&lt;p&gt;Data migration to MySQL HeatWave involves moving data from a source MySQL database (on-premises, cloud, or other infrastructure) to a target MySQL HeatWave DB system in Oracle Cloud Infrastructure.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Migration Process&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Export data from source using MySQL Shell dump utilities&lt;/li&gt;
&lt;li&gt;Store dump files in OCI Object Storage or locally&lt;/li&gt;
&lt;li&gt;Run compatibility checks for HeatWave&lt;/li&gt;
&lt;li&gt;Apply necessary modifications&lt;/li&gt;
&lt;li&gt;Import data into HeatWave DB system using &lt;code&gt;util.loadDump()&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;mysql-shell-dump-utilities&quot;&gt;MySQL Shell Dump Utilities&lt;/h3&gt;
&lt;p&gt;MySQL Shell provides three dump utilities: util.dumpInstance(), util.dumpSchemas(), and util.dumpTables(). Each serves different migration scenarios.&lt;/p&gt;
&lt;h4 id=&quot;1-util-dumpinstance-&quot;&gt;1. util.dumpInstance()&lt;/h4&gt;
&lt;p&gt;Exports all compatible schemas to Object Storage bucket or local files, including users, events, routines, and triggers by default&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What It Exports&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;All user schemas (excludes system schemas)&lt;/li&gt;
&lt;li&gt;User accounts and privileges&lt;/li&gt;
&lt;li&gt;Events, routines, and triggers&lt;/li&gt;
&lt;li&gt;Complete database structure&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;What It Excludes&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;System schemas: mysql, sys, performance_schema, information_schema, ndbinfo&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Example Usage&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;util.dumpInstance(&quot;/path/to/dump&quot;, {
  ocimds: true,
  threads: 8,
  compatibility: [&quot;force_innodb&quot;, &quot;strip_definers&quot;, &quot;strip_tablespaces&quot;]
})
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;To Object Storage&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;util.dumpInstance(&quot;&quot;, {
  osBucketName: &quot;myMigrationBucket&quot;,
  osNamespace: &quot;my-namespace&quot;,
  ocimds: true,
  threads: 16,
  compatibility: [&quot;force_innodb&quot;, &quot;strip_definers&quot;, &quot;strip_restricted_grants&quot;, 
                  &quot;strip_tablespaces&quot;, &quot;create_invisible_pks&quot;]
})
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;2-util-dumpschemas-&quot;&gt;2. util.dumpSchemas()&lt;/h4&gt;
&lt;p&gt;Exports selected schemas with all tables, triggers, routines, and events of those schemas&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What It Exports&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;All tables in specified schemas&lt;/li&gt;
&lt;li&gt;Triggers associated with tables&lt;/li&gt;
&lt;li&gt;Routines (stored procedures and functions)&lt;/li&gt;
&lt;li&gt;Events&lt;/li&gt;
&lt;li&gt;Views&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Example Usage&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;util.dumpSchemas([&quot;sales&quot;, &quot;inventory&quot;, &quot;customers&quot;], &quot;/path/to/dump&quot;, {
  ocimds: true,
  threads: 4,
  compatibility: [&quot;force_innodb&quot;, &quot;strip_definers&quot;]
})
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Multiple Schemas to Object Storage&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;util.dumpSchemas(
  [&quot;tpch&quot;, &quot;employees&quot;], 
  &quot;&quot;, 
  {
    osBucketName: &quot;mysqlData&quot;,
    osNamespace: &quot;abcdefghijkl&quot;,
    ocimds: true,
    threads: 16,
    compatibility: [&quot;force_innodb&quot;, &quot;strip_restricted_grants&quot;, 
                    &quot;strip_definers&quot;, &quot;strip_tablespaces&quot;, &quot;create_invisible_pks&quot;]
  }
)
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;3-util-dumptables-&quot;&gt;3. util.dumpTables()&lt;/h4&gt;
&lt;p&gt;Exports selected tables or views from a schema, including triggers of exported tables&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What It Exports&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Specified tables or views&lt;/li&gt;
&lt;li&gt;Triggers associated with those tables&lt;/li&gt;
&lt;li&gt;Schema structure needed to recreate tables&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Example Usage&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;util.dumpTables(&quot;sales&quot;, [&quot;orders&quot;, &quot;order_items&quot;, &quot;customers&quot;], &quot;/path/to/dump&quot;, {
  ocimds: true,
  threads: 2,
  compatibility: [&quot;force_innodb&quot;]
})
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;dump-utility-options&quot;&gt;Dump Utility Options&lt;/h3&gt;
&lt;p&gt;Dump utilities support parallel dumping with multiple threads, file compression, OCI Object Storage streaming, and MySQL HeatWave compatibility checks and modifications&lt;/p&gt;
&lt;h4 id=&quot;essential-options&quot;&gt;Essential Options&lt;/h4&gt;
&lt;h5 id=&quot;ocimds&quot;&gt;ocimds&lt;/h5&gt;
&lt;p&gt;Enables HeatWave Service compatibility checks. When set to &lt;code&gt;true&lt;/code&gt;, the dump cannot proceed if incompatibilities exist.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;ocimds: true
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Critical&lt;/strong&gt;: Dumps loaded into HeatWave must be created with &lt;code&gt;ocimds: true&lt;/code&gt;.&lt;/p&gt;
&lt;h5 id=&quot;threads&quot;&gt;threads&lt;/h5&gt;
&lt;p&gt;Number of parallel threads for dump operation. More threads = faster dumps but higher source load.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;threads: 16  // Use 4-16 for most workloads
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;compatibility&quot;&gt;compatibility&lt;/h5&gt;
&lt;p&gt;Array of modifications to apply during export to ensure HeatWave compatibility.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;compatibility: [&quot;force_innodb&quot;, &quot;strip_definers&quot;, &quot;strip_tablespaces&quot;, 
                &quot;create_invisible_pks&quot;]
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;bytesperchunk&quot;&gt;bytesPerChunk&lt;/h5&gt;
&lt;p&gt;Defines chunk size for large datasets. Default is 64MB.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;bytesPerChunk: &quot;128M&quot;  // For large datasets
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;compression&quot;&gt;compression&lt;/h5&gt;
&lt;p&gt;Compression algorithm for dump files.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;compression: &quot;zstd&quot;  // Options: zstd (default), gzip, none
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;maxrate&quot;&gt;maxRate&lt;/h5&gt;
&lt;p&gt;Maximum data read throughput during dump (in bytes per second).&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;maxRate: &quot;50M&quot;  // Limit to 50 MB/s to reduce source impact
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;advanced-options&quot;&gt;Advanced Options&lt;/h4&gt;
&lt;h5 id=&quot;dryrun&quot;&gt;dryRun&lt;/h5&gt;
&lt;p&gt;Displays what would be dumped and results of compatibility checks without proceeding&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;mode: &quot;dryrun&quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Always run dryRun first&lt;/strong&gt; to identify issues before actual export.&lt;/p&gt;
&lt;h5 id=&quot;consistent&quot;&gt;consistent&lt;/h5&gt;
&lt;p&gt;Ensures data consistency by using FLUSH TABLES WITH READ LOCK.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;consistent: true  // Default
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;excludeschemas-includeschemas&quot;&gt;excludeSchemas / includeSchemas&lt;/h5&gt;
&lt;p&gt;Filter which schemas to dump.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;excludeSchemas: [&quot;test&quot;, &quot;staging&quot;]
// Or
includeSchemas: [&quot;production&quot;, &quot;analytics&quot;]
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;excludetables-includetables&quot;&gt;excludeTables / includeTables&lt;/h5&gt;
&lt;p&gt;Filter tables within schemas (for dumpSchemas and dumpInstance).&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;excludeTables: [&quot;sales.temp_*&quot;, &quot;logs.old_*&quot;]
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;defaultcharacterset&quot;&gt;defaultCharacterSet&lt;/h5&gt;
&lt;p&gt;Specify character set for dump files.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;defaultCharacterSet: &quot;utf8mb4&quot;  // Recommended
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;performing-a-dry-run&quot;&gt;Performing a Dry Run&lt;/h3&gt;
&lt;p&gt;Always perform a dry run before actual export to identify compatibility issues&lt;/p&gt;
&lt;h4 id=&quot;dry-run-command&quot;&gt;Dry Run Command&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;util.dumpInstance(&quot;&quot;, {
  mode: &quot;dryrun&quot;,
  ocimds: true
})
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;what-dry-run-does&quot;&gt;What Dry Run Does&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;Connects to source database&lt;/li&gt;
&lt;li&gt;Analyzes schemas, tables, and objects&lt;/li&gt;
&lt;li&gt;Runs HeatWave compatibility checks&lt;/li&gt;
&lt;li&gt;Lists all objects to be dumped&lt;/li&gt;
&lt;li&gt;Reports compatibility issues&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Does not export any data&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&quot;sample-dry-run-output&quot;&gt;Sample Dry Run Output&lt;/h4&gt;
&lt;pre&gt;&lt;code&gt;Checking for compatibility with MySQL HeatWave Service

Compatibility issues with MySQL HeatWave Service 8.0.32
1) Schema 'sales'
  Table 'legacy_orders' uses MyISAM storage engine (issue: engine)
  Table 'customers' has no primary key (issue: no_pk)
  View 'active_orders' has DEFINER='admin'@'localhost' (issue: definer)

2) Schema 'inventory'
  Table 'items' uses MyISAM storage engine (issue: engine)
  
Compatibility issues found. Use 'compatibility' option to apply modifications.
Suggested options: [&quot;force_innodb&quot;, &quot;strip_definers&quot;, &quot;create_invisible_pks&quot;]
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;heatwave-compatibility-checks&quot;&gt;HeatWave Compatibility Checks&lt;/h3&gt;
&lt;p&gt;Setting ocimds option to true enables compatibility checks that list all issues when instance is dumped&lt;/p&gt;
&lt;h4 id=&quot;common-compatibility-issues&quot;&gt;Common Compatibility Issues&lt;/h4&gt;
&lt;h5 id=&quot;1-non-innodb-storage-engines&quot;&gt;1. Non-InnoDB Storage Engines&lt;/h5&gt;
&lt;p&gt;&lt;strong&gt;Issue&lt;/strong&gt;: HeatWave only supports InnoDB&lt;br&gt;
&lt;strong&gt;Solution&lt;/strong&gt;: Use &lt;code&gt;force_innodb&lt;/code&gt; compatibility option&lt;/p&gt;
&lt;h5 id=&quot;2-missing-primary-keys&quot;&gt;2. Missing Primary Keys&lt;/h5&gt;
&lt;p&gt;&lt;strong&gt;Issue&lt;/strong&gt;: High Availability requires primary keys on all tables&lt;br&gt;
&lt;strong&gt;Solution&lt;/strong&gt;: Use &lt;code&gt;create_invisible_pks&lt;/code&gt; or &lt;code&gt;ignore_missing_pks&lt;/code&gt;&lt;/p&gt;
&lt;h5 id=&quot;3-definer-clauses&quot;&gt;3. DEFINER Clauses&lt;/h5&gt;
&lt;p&gt;&lt;strong&gt;Issue&lt;/strong&gt;: Requires special privileges to create with custom definer&lt;br&gt;
&lt;strong&gt;Solution&lt;/strong&gt;: Use &lt;code&gt;strip_definers&lt;/code&gt;&lt;/p&gt;
&lt;h5 id=&quot;4-tablespace-clauses&quot;&gt;4. Tablespace Clauses&lt;/h5&gt;
&lt;p&gt;&lt;strong&gt;Issue&lt;/strong&gt;: HeatWave has tablespace restrictions&lt;br&gt;
&lt;strong&gt;Solution&lt;/strong&gt;: Use &lt;code&gt;strip_tablespaces&lt;/code&gt;&lt;/p&gt;
&lt;h5 id=&quot;5-restricted-grants&quot;&gt;5. Restricted Grants&lt;/h5&gt;
&lt;p&gt;&lt;strong&gt;Issue&lt;/strong&gt;: Some privileges not supported in HeatWave&lt;br&gt;
&lt;strong&gt;Solution&lt;/strong&gt;: Use &lt;code&gt;strip_restricted_grants&lt;/code&gt;&lt;/p&gt;
&lt;h5 id=&quot;6-external-authentication&quot;&gt;6. External Authentication&lt;/h5&gt;
&lt;p&gt;&lt;strong&gt;Issue&lt;/strong&gt;: Some authentication plugins not supported&lt;br&gt;
&lt;strong&gt;Solution&lt;/strong&gt;: Use &lt;code&gt;skip_invalid_accounts&lt;/code&gt;&lt;/p&gt;
&lt;h3 id=&quot;heatwave-compatibility-modifications&quot;&gt;HeatWave Compatibility Modifications&lt;/h3&gt;
&lt;p&gt;Compatibility options automatically modify exported data to resolve compatibility issues&lt;/p&gt;
&lt;h4 id=&quot;available-compatibility-options&quot;&gt;Available Compatibility Options&lt;/h4&gt;
&lt;h5 id=&quot;force-innodb&quot;&gt;force_innodb&lt;/h5&gt;
&lt;p&gt;Modifies ENGINE clause of CREATE TABLE statements to specify InnoDB for tables using incompatible storage engines&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What It Does&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Changes &lt;code&gt;ENGINE=MyISAM&lt;/code&gt; to &lt;code&gt;ENGINE=InnoDB&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Changes other engines (MEMORY, CSV, etc.) to InnoDB&lt;/li&gt;
&lt;li&gt;Leaves InnoDB tables unchanged&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;-- Before
CREATE TABLE orders (...) ENGINE=MyISAM;

-- After
CREATE TABLE orders (...) ENGINE=InnoDB;
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;strip-definers&quot;&gt;strip_definers&lt;/h5&gt;
&lt;p&gt;Removes DEFINER=account clause from views, routines, events, and triggers, changing SQL SECURITY to INVOKER&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What It Does&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Removes DEFINER clause&lt;/li&gt;
&lt;li&gt;Changes SQL SECURITY from DEFINER to INVOKER&lt;/li&gt;
&lt;li&gt;Objects created with default definer (user loading schema)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;-- Before
CREATE DEFINER=`admin`@`localhost` VIEW active_orders AS ...

-- After
CREATE VIEW active_orders AS ...
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;strip-tablespaces&quot;&gt;strip_tablespaces&lt;/h5&gt;
&lt;p&gt;Removes TABLESPACE clause from CREATE TABLE statements so tables are created in default tablespaces&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What It Does&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Removes TABLESPACE option from CREATE TABLE&lt;/li&gt;
&lt;li&gt;Comments out DATA DIRECTORY, INDEX DIRECTORY, ENCRYPTION options&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;-- Before
CREATE TABLE orders (...) TABLESPACE=ts1;

-- After
CREATE TABLE orders (...);
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;create-invisible-pks&quot;&gt;create_invisible_pks&lt;/h5&gt;
&lt;p&gt;Adds invisible primary keys to tables without primary keys, required for High Availability DB systems&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What It Does&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Adds invisible AUTO_INCREMENT column named &lt;code&gt;my_row_id&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Sets as primary key&lt;/li&gt;
&lt;li&gt;No impact on applications (column is invisible)&lt;/li&gt;
&lt;li&gt;Requires MySQL 8.0.24+ on target&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Example&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;-- Before
CREATE TABLE logs (
  timestamp DATETIME,
  message TEXT
);

-- After
CREATE TABLE logs (
  my_row_id BIGINT UNSIGNED AUTO_INCREMENT INVISIBLE PRIMARY KEY,
  timestamp DATETIME,
  message TEXT
);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Alternative&lt;/strong&gt;: &lt;code&gt;ignore_missing_pks&lt;/code&gt; - ignores missing PKs but cannot load to HA systems.&lt;/p&gt;
&lt;h5 id=&quot;strip-restricted-grants&quot;&gt;strip_restricted_grants&lt;/h5&gt;
&lt;p&gt;Removes privileges that are restricted in MySQL HeatWave Service&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Restricted Privileges&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;SUPER&lt;/li&gt;
&lt;li&gt;FILE&lt;/li&gt;
&lt;li&gt;RELOAD&lt;/li&gt;
&lt;li&gt;BINLOG_ADMIN&lt;/li&gt;
&lt;li&gt;Others specific to managed service&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id=&quot;skip-invalid-accounts&quot;&gt;skip_invalid_accounts&lt;/h5&gt;
&lt;p&gt;Skips user accounts with external authentication plugins not supported in HeatWave.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Also removes&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Accounts without passwords (except roles)&lt;/li&gt;
&lt;li&gt;Accounts using unsupported plugins&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;applying-compatibility-options&quot;&gt;Applying Compatibility Options&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;util.dumpInstance(&quot;&quot;, {
  osBucketName: &quot;migrationBucket&quot;,
  ocimds: true,
  compatibility: [
    &quot;force_innodb&quot;,
    &quot;strip_definers&quot;,
    &quot;strip_restricted_grants&quot;,
    &quot;strip_tablespaces&quot;,
    &quot;create_invisible_pks&quot;
  ]
})
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;step-by-step-migration-process&quot;&gt;Step-by-Step Migration Process&lt;/h3&gt;
&lt;h4 id=&quot;step-1-prepare-source-database&quot;&gt;Step 1: Prepare Source Database&lt;/h4&gt;
&lt;p&gt;Ensure MySQL Shell is installed and source is accessible:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;mysqlsh --version  # Should be 8.0.21 or later
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;step-2-run-dry-run&quot;&gt;Step 2: Run Dry Run&lt;/h4&gt;
&lt;p&gt;Identify compatibility issues:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;mysqlsh admin@source_server:3306 -- util dump-instance &quot;&quot; \
  --mode=dryrun \
  --ocimds=true
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;step-3-analyze-dry-run-output&quot;&gt;Step 3: Analyze Dry Run Output&lt;/h4&gt;
&lt;p&gt;Review compatibility issues and note suggested options:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Storage engine issues → &lt;code&gt;force_innodb&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Missing PKs → &lt;code&gt;create_invisible_pks&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Definer clauses → &lt;code&gt;strip_definers&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Tablespace issues → &lt;code&gt;strip_tablespaces&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;step-4-export-data-with-modifications&quot;&gt;Step 4: Export Data with Modifications&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;To Local Files&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;mysqlsh admin@source_server:3306 -- util dump-instance /backup/migration \
  --ocimds=true \
  --threads=8 \
  --bytesPerChunk=128M \
  --compatibility='[&quot;force_innodb&quot;,&quot;strip_definers&quot;,&quot;strip_tablespaces&quot;,&quot;create_invisible_pks&quot;]'
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;To Object Storage&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;mysqlsh admin@source_server:3306 -- util dump-instance &quot;&quot; \
  --osBucketName=migrationBucket \
  --osNamespace=my-namespace \
  --ocimds=true \
  --threads=16 \
  --compression=zstd \
  --compatibility='[&quot;force_innodb&quot;,&quot;strip_definers&quot;,&quot;strip_restricted_grants&quot;,&quot;strip_tablespaces&quot;,&quot;create_invisible_pks&quot;]'
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;step-5-import-data-into-heatwave&quot;&gt;Step 5: Import Data into HeatWave&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;From Object Storage&lt;/strong&gt; (during DB system creation):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Select &quot;Import data from Object Storage&quot;&lt;/li&gt;
&lt;li&gt;Provide bucket details&lt;/li&gt;
&lt;li&gt;HeatWave automatically imports during provisioning&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;To Existing DB System&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;mysqlsh admin@heatwave_endpoint:3306 -- util load-dump /backup/migration \
  --threads=16 \
  --progressFile=/tmp/load-progress.json
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;From Object Storage to Existing System&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;mysqlsh admin@heatwave_endpoint:3306 -- util load-dump migrationBucket \
  --osBucketName=migrationBucket \
  --osNamespace=my-namespace \
  --threads=16
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;best-practices-1&quot;&gt;Best Practices&lt;/h3&gt;
&lt;h4 id=&quot;1-always-use-ocimds-true&quot;&gt;1. Always Use ocimds: true&lt;/h4&gt;
&lt;p&gt;Ensures HeatWave compatibility checks run during export. Dumps without this cannot be loaded into HeatWave.&lt;/p&gt;
&lt;h4 id=&quot;2-run-dry-run-first&quot;&gt;2. Run Dry Run First&lt;/h4&gt;
&lt;p&gt;Identify compatibility issues before actual export to avoid failed migrations&lt;/p&gt;
&lt;h4 id=&quot;3-use-appropriate-thread-count&quot;&gt;3. Use Appropriate Thread Count&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Small databases (&amp;lt; 10GB): 2-4 threads&lt;/li&gt;
&lt;li&gt;Medium databases (10-100GB): 8-12 threads&lt;/li&gt;
&lt;li&gt;Large databases (&amp;gt; 100GB): 16-32 threads&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Balance&lt;/strong&gt;: More threads = faster but higher source load.&lt;/p&gt;
&lt;h4 id=&quot;4-chunk-large-tables&quot;&gt;4. Chunk Large Tables&lt;/h4&gt;
&lt;p&gt;For very large tables, use bytesPerChunk:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;bytesPerChunk: &quot;256M&quot;  // For tables &amp;gt; 10GB
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;5-use-compression&quot;&gt;5. Use Compression&lt;/h4&gt;
&lt;p&gt;Reduces storage and transfer costs:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;compression: &quot;zstd&quot;  // Best compression ratio and speed
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;6-monitor-dump-progress&quot;&gt;6. Monitor Dump Progress&lt;/h4&gt;
&lt;p&gt;Dumps display progress including:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Total rows to dump&lt;/li&gt;
&lt;li&gt;Rows dumped so far&lt;/li&gt;
&lt;li&gt;Percentage complete&lt;/li&gt;
&lt;li&gt;Throughput (rows/sec, MB/sec)&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;7-test-with-subset-first&quot;&gt;7. Test with Subset First&lt;/h4&gt;
&lt;p&gt;For large migrations, test with single schema:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;util.dumpSchemas([&quot;test_schema&quot;], ...)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Validate before full migration.&lt;/p&gt;
&lt;h4 id=&quot;8-plan-for-downtime&quot;&gt;8. Plan for Downtime&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Read-only mode during export for consistency&lt;/li&gt;
&lt;li&gt;Or use consistent: true for point-in-time snapshot&lt;/li&gt;
&lt;li&gt;Plan maintenance window for production migrations&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;9-validate-after-import&quot;&gt;9. Validate After Import&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;-- Check row counts
SELECT COUNT(*) FROM imported_table;

-- Verify structure
SHOW CREATE TABLE imported_table;

-- Test queries
SELECT * FROM imported_table LIMIT 10;
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;10-keep-dump-files&quot;&gt;10. Keep Dump Files&lt;/h4&gt;
&lt;p&gt;Retain dump files until migration validated:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Local backups or Object Storage&lt;/li&gt;
&lt;li&gt;Useful for troubleshooting&lt;/li&gt;
&lt;li&gt;Allows re-import if needed&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;troubleshooting-common-issues&quot;&gt;Troubleshooting Common Issues&lt;/h3&gt;
&lt;h4 id=&quot;issue-1-dump-fails-with-compatibility-errors&quot;&gt;Issue 1: Dump Fails with Compatibility Errors&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Symptoms&lt;/strong&gt;: Export aborts with list of incompatible objects&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Solution&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Run dry run to see all issues&lt;/li&gt;
&lt;li&gt;Apply suggested compatibility options&lt;/li&gt;
&lt;li&gt;For manual issues, fix source schema&lt;/li&gt;
&lt;li&gt;Re-run export&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&quot;issue-2-out-of-memory-during-dump&quot;&gt;Issue 2: Out of Memory During Dump&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Symptoms&lt;/strong&gt;: Process killed, &quot;out of memory&quot; errors&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Solution&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Reduce thread count&lt;/li&gt;
&lt;li&gt;Increase system memory&lt;/li&gt;
&lt;li&gt;Use bytesPerChunk to process smaller chunks&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;issue-3-load-fails-with-local-infile-error&quot;&gt;Issue 3: Load Fails with &quot;local_infile&quot; Error&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Symptoms&lt;/strong&gt;: Import fails, local_infile error&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Solution&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;-- On HeatWave DB system
SET GLOBAL local_infile = ON;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;(Default is ON in HeatWave, but verify)&lt;/p&gt;
&lt;h4 id=&quot;issue-4-tables-missing-after-import&quot;&gt;Issue 4: Tables Missing After Import&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Symptoms&lt;/strong&gt;: Some tables not imported&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Solution&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Check excluded tables in dump command&lt;/li&gt;
&lt;li&gt;Verify tables exported in dump metadata&lt;/li&gt;
&lt;li&gt;Check for errors in load-progress.json&lt;/li&gt;
&lt;li&gt;Ensure compatibility options applied correctly&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Migrating data to MySQL HeatWave using MySQL Shell dump utilities provides a reliable, efficient path to the cloud. By understanding the three dump utilities, running compatibility checks, and applying appropriate modifications, you can ensure smooth migrations with minimal issues.&lt;/p&gt;
&lt;p&gt;Key takeaways:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Use util.dumpInstance()&lt;/strong&gt; for complete database migrations&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use util.dumpSchemas()&lt;/strong&gt; for selective schema migrations&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use util.dumpTables()&lt;/strong&gt; for specific table exports&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Always run dry run first&lt;/strong&gt; to identify compatibility issues&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Apply compatibility options&lt;/strong&gt; to auto-fix common issues&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Test with subset&lt;/strong&gt; before full migration&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monitor and validate&lt;/strong&gt; throughout the process&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Whether migrating from on-premises, other clouds, or between HeatWave regions, MySQL Shell dump utilities provide the tools needed for successful data migration to MySQL HeatWave.&lt;/p&gt;
</description>
<category>mysql</category>
<guid isPermaLink="true">https://coderlegion.com/7832/mysql-heatwave-migrating-your-data-to-heatwave-service</guid>
<pubDate>Wed, 26 Nov 2025 10:08:43 +0000</pubDate>
</item>
<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-2&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-1&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-3&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>
<item>
<title>MySQL HeatWave: Backing Up and Restoring DB Systems</title>
<link>https://coderlegion.com/7384/mysql-heatwave-backing-up-and-restoring-db-systems</link>
<description>&lt;p&gt;MySQL HeatWave provides comprehensive backup and restore capabilities to safeguard data against accidental loss, corruption, cyberattacks, and hardware failures. This guide covers backup types, creation methods, management operations, and point-in-time recovery strategies.&lt;/p&gt;
&lt;h3 id=&quot;understanding-backup-types&quot;&gt;Understanding Backup Types&lt;/h3&gt;
&lt;h4 id=&quot;full-backup&quot;&gt;Full Backup&lt;/h4&gt;
&lt;p&gt;A full backup backs up all data in the DB system, creating a complete snapshot at a specific point in time.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Characteristics&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Captures all data in the DB system&lt;/li&gt;
&lt;li&gt;Backup size usually smaller than DB storage (unused space not backed up)&lt;/li&gt;
&lt;li&gt;Self-contained and can be restored independently&lt;/li&gt;
&lt;li&gt;Takes longer than incremental backups&lt;/li&gt;
&lt;li&gt;Consumes more storage space&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;incremental-backup&quot;&gt;Incremental Backup&lt;/h4&gt;
&lt;p&gt;An incremental backup backs up only data added or changed since the last backup.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Characteristics&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;First incremental backup is always a full backup&lt;/li&gt;
&lt;li&gt;Subsequent backups capture only changes (deltas)&lt;/li&gt;
&lt;li&gt;Faster to create than full backups&lt;/li&gt;
&lt;li&gt;Default backup type for MySQL HeatWave&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Important&lt;/strong&gt;: For data recovery, there's no functional difference between incremental and full backups. You can restore all data from any backup.&lt;/p&gt;
&lt;h4 id=&quot;backup-merging&quot;&gt;Backup Merging&lt;/h4&gt;
&lt;p&gt;When you delete a backup, it merges into the following incremental backup. The latest backup is not merged as no subsequent backup exists.&lt;/p&gt;
&lt;h3 id=&quot;backup-creation-types&quot;&gt;Backup Creation Types&lt;/h3&gt;
&lt;h4 id=&quot;1-manual-backup&quot;&gt;1. Manual Backup&lt;/h4&gt;
&lt;p&gt;Created by users via OCI Console, CLI, or REST API.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Characteristics&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Retention: 1-365 days&lt;/li&gt;
&lt;li&gt;Can be created on inactive DB systems&lt;/li&gt;
&lt;li&gt;Not automatically deleted with DB system&lt;/li&gt;
&lt;li&gt;Cannot be created on Always Free systems&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;CLI Example&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;oci mysql backup create \
  --db-system-id &amp;lt;DB_SYSTEM_OCID&amp;gt; \
  --backup-type INCREMENTAL \
  --display-name &quot;Pre-Upgrade-Backup&quot; \
  --retention-in-days 30
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;2-automatic-backup&quot;&gt;2. Automatic Backup&lt;/h4&gt;
&lt;p&gt;Created automatically at scheduled time.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Characteristics&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Retention: 1-35 days (default: 7 days)&lt;/li&gt;
&lt;li&gt;Created even when DB system is inactive&lt;/li&gt;
&lt;li&gt;Binary logs backed up every 5 minutes&lt;/li&gt;
&lt;li&gt;For HA systems: cannot be disabled&lt;/li&gt;
&lt;li&gt;Deleted with DB system (unless retention configured)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Configure via CLI&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;oci mysql db-system update \
  --db-system-id &amp;lt;DB_SYSTEM_OCID&amp;gt; \
  --backup-policy '{
    &quot;isEnabled&quot;: true,
    &quot;retentionInDays&quot;: 14,
    &quot;pitrPolicy&quot;: {&quot;isEnabled&quot;: true}
  }'
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;3-final-backup&quot;&gt;3. Final Backup&lt;/h4&gt;
&lt;p&gt;Created before deleting a DB system.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Characteristics&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Retention: 365 days (fixed)&lt;/li&gt;
&lt;li&gt;Acts as safety net for inadvertent deletions&lt;/li&gt;
&lt;li&gt;Cannot be modified after creation&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;4-operator-backup&quot;&gt;4. Operator Backup&lt;/h4&gt;
&lt;p&gt;Created by MySQL Support team for troubleshooting.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Characteristics&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Always full backups&lt;/li&gt;
&lt;li&gt;Deleted automatically after investigation&lt;/li&gt;
&lt;li&gt;Do not affect service limits&lt;/li&gt;
&lt;li&gt;Managed by Oracle Support&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;managing-backups&quot;&gt;Managing Backups&lt;/h3&gt;
&lt;h4 id=&quot;listing-backups&quot;&gt;Listing Backups&lt;/h4&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;# List all backups
oci mysql backup list --compartment-id &amp;lt;COMPARTMENT_OCID&amp;gt;

# List for specific DB system
oci mysql backup list \
  --compartment-id &amp;lt;COMPARTMENT_OCID&amp;gt; \
  --db-system-id &amp;lt;DB_SYSTEM_OCID&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;updating-backups&quot;&gt;Updating Backups&lt;/h4&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 backup update \
  --backup-id &amp;lt;BACKUP_OCID&amp;gt; \
  --display-name &quot;Updated-Name&quot; \
  --retention-in-days 20
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;moving-backups&quot;&gt;Moving Backups&lt;/h4&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 backup change-compartment \
  --backup-id &amp;lt;BACKUP_OCID&amp;gt; \
  --compartment-id &amp;lt;TARGET_COMPARTMENT_OCID&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;deleting-backups&quot;&gt;Deleting Backups&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Soft Delete&lt;/strong&gt;: When enabled, backups are retained for additional 7 days in DELETE_SCHEDULED state before permanent deletion.&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 backup delete --backup-id &amp;lt;BACKUP_OCID&amp;gt; --force
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;validating-backups&quot;&gt;Validating Backups&lt;/h4&gt;
&lt;p&gt;Validation restores backup to a temporary standalone DB system (invisible to customer), then immediately deletes it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Validation States&lt;/strong&gt;: NOT_VALIDATED, VALIDATED, NEEDS_VALIDATION, FAILED&lt;/p&gt;
&lt;h3 id=&quot;point-in-time-recovery-pitr-&quot;&gt;Point-in-Time Recovery (PITR)&lt;/h3&gt;
&lt;p&gt;PITR allows restoring a DB system to a specific point in time, achieving ~5-minute RPO.&lt;/p&gt;
&lt;h4 id=&quot;how-pitr-works&quot;&gt;How PITR Works&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;MySQL HeatWave takes initial full backup, then incremental backups&lt;/li&gt;
&lt;li&gt;Binary logs backed up every 5 minutes&lt;/li&gt;
&lt;li&gt;On PITR initiation, identifies latest backup before selected point&lt;/li&gt;
&lt;li&gt;Restores from backup, applies binary log changes&lt;/li&gt;
&lt;li&gt;Creates new DB system with data at exact point&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&quot;benefits&quot;&gt;Benefits&lt;/h4&gt;
&lt;p&gt;PITR safeguards against:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Accidental data loss&lt;/strong&gt;: Dropped tables, mistaken DELETE/UPDATE&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cyberattacks&lt;/strong&gt;: Ransomware, SQL injection, malicious modifications&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Equipment failure&lt;/strong&gt;: Hardware corruption, storage failures&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Human error&lt;/strong&gt;: Incorrect batch operations, failed deployments&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;enabling-pitr&quot;&gt;Enabling PITR&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Requirements&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Automatic backups must be enabled&lt;/li&gt;
&lt;li&gt;Prior to MySQL 8.3.0-u2, cannot enable with HeatWave Lakehouse&lt;/li&gt;
&lt;/ul&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 db-system update \
  --db-system-id &amp;lt;DB_SYSTEM_OCID&amp;gt; \
  --backup-policy '{
    &quot;isEnabled&quot;: true,
    &quot;retentionInDays&quot;: 14,
    &quot;pitrPolicy&quot;: {&quot;isEnabled&quot;: true}
  }'
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;pitr-recovery-window&quot;&gt;PITR Recovery Window&lt;/h4&gt;
&lt;p&gt;Earliest restore point: When PITR enabled or first backup time (whichever is later)&lt;br&gt;
Latest restore point: Current time (within last 5 minutes)&lt;/p&gt;
&lt;h4 id=&quot;supported-scenarios-1&quot;&gt;Supported Scenarios&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Standalone → Standalone or HA&lt;/li&gt;
&lt;li&gt;HA → Standalone or HA&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Requirements for restoring to HA&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Primary keys on every table&lt;/li&gt;
&lt;li&gt;MySQL 8.0.24 or higher&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;restoring-from-backups&quot;&gt;Restoring from Backups&lt;/h3&gt;
&lt;h4 id=&quot;console-method&quot;&gt;Console Method&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;Navigate to DB System details → Resources → Backups&lt;/li&gt;
&lt;li&gt;Select backup → Click &lt;strong&gt;Restore backup&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Configure new DB system settings&lt;/li&gt;
&lt;li&gt;No admin credentials requested (uses original credentials)&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Restore&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&quot;pitr-restore-cli-&quot;&gt;PITR Restore (CLI)&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;oci mysql db-system create-from-backup \
  --admin-username admin \
  --admin-password &amp;lt;PASSWORD&amp;gt; \
  --compartment-id &amp;lt;COMPARTMENT_OCID&amp;gt; \
  --shape-name MySQL.8 \
  --subnet-id &amp;lt;SUBNET_OCID&amp;gt; \
  --display-name &quot;PITR-Restored-System&quot; \
  --source-type PITR \
  --source-backup-id &amp;lt;BACKUP_OCID&amp;gt; \
  --point-in-time-recovery-details '{
    &quot;pointInTime&quot;: &quot;2024-11-15T14:30:00.000Z&quot;
  }'
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;restoration-process&quot;&gt;Restoration Process&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;New DB system provisioned&lt;/li&gt;
&lt;li&gt;Backup restored&lt;/li&gt;
&lt;li&gt;Binary logs replayed (for PITR)&lt;/li&gt;
&lt;li&gt;DB system transitions to ACTIVE&lt;/li&gt;
&lt;li&gt;Original DB system unchanged&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Duration&lt;/strong&gt;: Typically 15-45 minutes for moderate databases (excludes PITR replay and additional features like HA, HeatWave cluster)&lt;/p&gt;
&lt;h3 id=&quot;best-practices-4&quot;&gt;Best Practices&lt;/h3&gt;
&lt;h4 id=&quot;1-implement-3-2-1-rule&quot;&gt;1. Implement 3-2-1 Rule&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;3&lt;/strong&gt; copies of data&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;2&lt;/strong&gt; different storage types&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;1&lt;/strong&gt; off-site copy&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;2-enable-automatic-backups&quot;&gt;2. Enable Automatic Backups&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Always enable for production&lt;/li&gt;
&lt;li&gt;Set retention based on requirements (7-35 days)&lt;/li&gt;
&lt;li&gt;Schedule during low-traffic periods&lt;/li&gt;
&lt;li&gt;Enable PITR for critical systems&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;3-create-manual-backups&quot;&gt;3. Create Manual Backups&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Before major deployments&lt;/li&gt;
&lt;li&gt;Prior to upgrades&lt;/li&gt;
&lt;li&gt;For long-term archival (up to 365 days)&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;4-test-regularly&quot;&gt;4. Test Regularly&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Validate backup integrity&lt;/li&gt;
&lt;li&gt;Practice restoration procedures&lt;/li&gt;
&lt;li&gt;Verify RTO and RPO metrics&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;5-use-regional-copies&quot;&gt;5. Use Regional Copies&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Enable for mission-critical systems&lt;/li&gt;
&lt;li&gt;Protects against regional disasters&lt;/li&gt;
&lt;li&gt;Available on OCI only&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;6-monitor-backup-health&quot;&gt;6. Monitor Backup Health&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Set up failure alerts&lt;/li&gt;
&lt;li&gt;Monitor backup size trends&lt;/li&gt;
&lt;li&gt;Track backup duration&lt;/li&gt;
&lt;li&gt;Review logs regularly&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;7-document-procedures&quot;&gt;7. Document Procedures&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Maintain restoration runbooks&lt;/li&gt;
&lt;li&gt;Document PITR decision criteria&lt;/li&gt;
&lt;li&gt;Track retention policies&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;8-optimize-costs&quot;&gt;8. Optimize Costs&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Right-size retention periods&lt;/li&gt;
&lt;li&gt;Use incremental backups (default)&lt;/li&gt;
&lt;li&gt;Clean up obsolete backups&lt;/li&gt;
&lt;li&gt;Leverage soft delete&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;platform-specific-differences&quot;&gt;Platform-Specific Differences&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;MySQL HeatWave on OCI&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Full backup and PITR support&lt;/li&gt;
&lt;li&gt;Regional backup copies available&lt;/li&gt;
&lt;li&gt;All backup types supported&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;MySQL HeatWave on AWS&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Backups are Amazon EBS snapshots saved to S3&lt;/li&gt;
&lt;li&gt;HeatWave cluster provisioning not supported when restoring to HA&lt;/li&gt;
&lt;li&gt;Long periods between backups may slow operations&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Always Free Systems&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Cannot create manual backups&lt;/li&gt;
&lt;li&gt;Automatic backup retention fixed at 1 day&lt;/li&gt;
&lt;li&gt;PITR not supported&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;troubleshooting-1&quot;&gt;Troubleshooting&lt;/h3&gt;
&lt;h4 id=&quot;backup-creation-failures&quot;&gt;Backup Creation Failures&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Causes&lt;/strong&gt;: Insufficient storage, long-running transactions, connectivity issues&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Solutions&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Check DB system is ACTIVE&lt;/li&gt;
&lt;li&gt;Verify sufficient storage&lt;/li&gt;
&lt;li&gt;Review error messages&lt;/li&gt;
&lt;li&gt;Check long-running transactions: &lt;code&gt;SHOW PROCESSLIST;&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;Retry backup creation&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&quot;pitr-restore-too-long&quot;&gt;PITR Restore Too Long&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Causes&lt;/strong&gt;: Large binary log replay, slow storage, complex database&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Solutions&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Choose earlier restore point&lt;/li&gt;
&lt;li&gt;Use larger shape&lt;/li&gt;
&lt;li&gt;Monitor work request progress&lt;/li&gt;
&lt;li&gt;Consider regular backup instead&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&quot;validation-failures&quot;&gt;Validation Failures&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Causes&lt;/strong&gt;: Backup corruption, compatibility issues&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Solutions&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Retry validation&lt;/li&gt;
&lt;li&gt;Test restore to actual DB system&lt;/li&gt;
&lt;li&gt;Create new backup and validate&lt;/li&gt;
&lt;li&gt;Contact Oracle Support&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Effective backup and recovery strategies are fundamental for data integrity and business continuity in MySQL HeatWave. Key takeaways:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Use both backup types&lt;/strong&gt;: Full and incremental work seamlessly&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Enable automatic backups&lt;/strong&gt;: Essential for production&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Leverage PITR&lt;/strong&gt;: Provides ~5-minute RPO&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Test regularly&lt;/strong&gt;: Validate backups and practice restoration&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Plan for disasters&lt;/strong&gt;: Use regional copies and off-site backups&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monitor and maintain&lt;/strong&gt;: Track health and optimize retention&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;MySQL HeatWave's comprehensive backup and restore capabilities ensure quick, reliable data recovery from accidental deletions, system failures, or security incidents.&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://coderlegion.com/7384/mysql-heatwave-backing-up-and-restoring-db-systems</guid>
<pubDate>Sat, 15 Nov 2025 09:29:28 +0000</pubDate>
</item>
<item>
<title>MySQL HeatWave: Connecting and Managing DB Systems</title>
<link>https://coderlegion.com/7226/mysql-heatwave-connecting-and-managing-db-systems</link>
<description>&lt;h2 id=&quot;mysql-heatwave-connecting-and-managing-db-systems&quot;&gt;MySQL HeatWave: Connecting and Managing DB Systems&lt;/h2&gt;
&lt;h3 id=&quot;introduction&quot;&gt;Introduction&lt;/h3&gt;
&lt;p&gt;MySQL HeatWave provides a fully managed database service with robust connectivity options and comprehensive management capabilities. This guide covers DB system endpoints, secure connections, and lifecycle management through the OCI console and CLI tools.&lt;/p&gt;
&lt;h3 id=&quot;understanding-db-system-endpoints&quot;&gt;Understanding DB System Endpoints&lt;/h3&gt;
&lt;h4 id=&quot;endpoint-components&quot;&gt;Endpoint Components&lt;/h4&gt;
&lt;p&gt;A MySQL HeatWave DB system endpoint consists of three key elements:&lt;/p&gt;
&lt;h5 id=&quot;1-private-ip-address&quot;&gt;1. Private IP Address&lt;/h5&gt;
&lt;ul&gt;
&lt;li&gt;Assigned from the VCN subnet CIDR range&lt;/li&gt;
&lt;li&gt;Remains constant throughout the DB system's lifetime&lt;/li&gt;
&lt;li&gt;Not directly accessible from the public internet&lt;/li&gt;
&lt;li&gt;Provides secure, isolated connectivity&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id=&quot;2-mysql-port-number-3306-&quot;&gt;2. MySQL Port Number (3306)&lt;/h5&gt;
&lt;p&gt;Port 3306 is the default port for MySQL protocol connections (used by MySQL Client and as backup by MySQL Shell). You can specify a port between 1024-65535 when creating the DB system.&lt;/p&gt;
&lt;h5 id=&quot;3-x-protocol-port-number-33060-&quot;&gt;3. X Protocol Port Number (33060)&lt;/h5&gt;
&lt;p&gt;Port 33060 is the default for X Protocol connections (used by MySQL Shell). Supports asynchronous operations, CRUD operations, document store functionality, and better performance for modern applications.&lt;/p&gt;
&lt;h4 id=&quot;platform-specific-differences-1&quot;&gt;Platform-Specific Differences&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;MySQL HeatWave on OCI&lt;/strong&gt;: Private IP addresses within VCN, requires network path through VCN/VPN/bastion&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;MySQL HeatWave on AWS&lt;/strong&gt;: Public endpoint with FQDN, requires allowed client IPs in CIDR format, TLS 1.2 encryption&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;MySQL HeatWave for Azure&lt;/strong&gt;: Hybrid networking between Azure VNet and OCI VCN with private connectivity&lt;/p&gt;
&lt;h3 id=&quot;network-path-requirements&quot;&gt;Network Path Requirements&lt;/h3&gt;
&lt;p&gt;Because DB systems use private IP addresses, you need one of these network paths:&lt;/p&gt;
&lt;h4 id=&quot;option-1-same-vcn&quot;&gt;Option 1: Same VCN&lt;/h4&gt;
&lt;p&gt;Connect from resources within the same VCN. Lowest latency, highest security, no additional networking costs.&lt;/p&gt;
&lt;h4 id=&quot;option-2-same-region-different-vcn-&quot;&gt;Option 2: Same Region (Different VCN)&lt;/h4&gt;
&lt;p&gt;Use VCN Peering or Dynamic Routing Gateway (DRG) to connect VCNs in the same region.&lt;/p&gt;
&lt;h4 id=&quot;option-3-on-premises-network&quot;&gt;Option 3: On-Premises Network&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Site-to-Site VPN&lt;/strong&gt;: IPSec VPN tunnel, up to 250 Mbps per tunnel&lt;br&gt;
&lt;strong&gt;FastConnect&lt;/strong&gt;: Dedicated physical connection, up to 10 Gbps bandwidth&lt;/p&gt;
&lt;h4 id=&quot;option-4-bastion-host&quot;&gt;Option 4: Bastion Host&lt;/h4&gt;
&lt;p&gt;Use OCI Bastion service or self-managed bastion host in public subnet for secure administrative access.&lt;/p&gt;
&lt;h4 id=&quot;option-5-oci-cloud-shell&quot;&gt;Option 5: OCI Cloud Shell&lt;/h4&gt;
&lt;p&gt;Browser-based terminal with pre-installed MySQL Shell. Free, no local setup required.&lt;/p&gt;
&lt;h3 id=&quot;connecting-to-mysql-heatwave&quot;&gt;Connecting to MySQL HeatWave&lt;/h3&gt;
&lt;h4 id=&quot;using-oci-cloud-shell&quot;&gt;Using OCI Cloud Shell&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;# Launch Cloud Shell from OCI Console
mysqlsh admin@10.0.1.100:3306 --sql

# Using X Protocol
mysqlsh admin@10.0.1.100:33060

# With database name
mysqlsh admin@10.0.1.100:3306/myapp_db --sql
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;using-compute-instance&quot;&gt;Using Compute Instance&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Install MySQL Shell (Oracle Linux/RHEL)&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;sudo yum install -y mysql-shell
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Connect&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;mysqlsh --host &amp;lt;DB_PRIVATE_IP&amp;gt; --port 3306 --user admin --password --sql
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;application-connections&quot;&gt;Application Connections&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Python&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;import mysql.connector
config = {
    'user': 'admin',
    'password': 'your_password',
    'host': '10.0.1.100',
    'port': 3306,
    'database': 'myapp_db',
    'ssl_disabled': False
}
connection = mysql.connector.connect(**config)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Node.js&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-javascript&quot;&gt;const mysql = require('mysql2');
const connection = mysql.createConnection({
  host: '10.0.1.100',
  port: 3306,
  user: 'admin',
  password: 'your_password',
  database: 'myapp_db',
  ssl: { rejectUnauthorized: true }
});
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;managing-db-systems&quot;&gt;Managing DB Systems&lt;/h3&gt;
&lt;h4 id=&quot;accessing-management-console&quot;&gt;Accessing Management Console&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;Log in to OCI Console at cloud.oracle.com&lt;/li&gt;
&lt;li&gt;Navigate: Menu → Databases → HeatWave MySQL → DB Systems&lt;/li&gt;
&lt;li&gt;Select compartment and click DB system name&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&quot;lifecycle-operations&quot;&gt;Lifecycle Operations&lt;/h4&gt;
&lt;h5 id=&quot;stop-a-db-system&quot;&gt;Stop a DB System&lt;/h5&gt;
&lt;p&gt;&lt;strong&gt;Purpose&lt;/strong&gt;: Stops compute billing (storage billing continues)&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;When to use&lt;/strong&gt;: Non-production environments, cost optimization during idle periods&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Impact&lt;/strong&gt;: Connections terminated, DB unavailable, HeatWave cluster also stops and reloads data on restart&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Console&lt;/strong&gt;: DB System details → Stop → Select shutdown type (Fast/Slow/Immediate) → Confirm&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 db-system stop --db-system-id &amp;lt;OCID&amp;gt; --shutdown-type FAST
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;start-an-inactive-db-system&quot;&gt;Start an Inactive DB System&lt;/h5&gt;
&lt;p&gt;Resume a stopped system. Billing resumes, HeatWave cluster automatically restarts and reloads data.&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 db-system start --db-system-id &amp;lt;OCID&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Startup times&lt;/strong&gt;: Fast shutdown (2-5 min), Slow shutdown (1-3 min), Immediate shutdown (5-15 min)&lt;/p&gt;
&lt;h5 id=&quot;restart-an-active-db-system&quot;&gt;Restart an Active DB System&lt;/h5&gt;
&lt;p&gt;Shuts down then restarts immediately. Brief downtime (3-10 minutes), all connections terminated, uncommitted transactions rolled back.&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 db-system restart --db-system-id &amp;lt;OCID&amp;gt; --shutdown-type FAST
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;delete-a-db-system&quot;&gt;Delete a DB System&lt;/h5&gt;
&lt;p&gt;&lt;strong&gt;Warning&lt;/strong&gt;: Permanently deletes DB system and all data. Cannot be undone.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Before deleting&lt;/strong&gt;: Create final backup, export critical data, check dependencies, review deletion policy&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Console&lt;/strong&gt;: DB System details → Delete → Choose backup retention → Type DB system name → Confirm&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 db-system delete --db-system-id &amp;lt;OCID&amp;gt; --force
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;understanding-db-system-states&quot;&gt;Understanding DB System States&lt;/h3&gt;
&lt;h4 id=&quot;state-indicators&quot;&gt;State Indicators&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Green (Active/Available)&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;ACTIVE&lt;/strong&gt;: Fully operational, accepting connections&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;UPDATING&lt;/strong&gt;: Configuration changes in progress&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Yellow (Transitional)&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;CREATING&lt;/strong&gt;: Being provisioned (15-30 minutes)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;STARTING&lt;/strong&gt;: Booting up after stop&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;STOPPING&lt;/strong&gt;: Shutting down&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;RESTARTING&lt;/strong&gt;: Shutdown + automatic startup&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Red (Failed/Error)&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;FAILED&lt;/strong&gt;: Operation failed, may require recreation&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;DELETING&lt;/strong&gt;: Deletion in progress&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Gray (Inactive/Deleted)&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;INACTIVE&lt;/strong&gt;: Stopped, no compute billing&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;DELETED&lt;/strong&gt;: Permanently removed&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;monitoring-states&quot;&gt;Monitoring States&lt;/h4&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 db-system get --db-system-id &amp;lt;OCID&amp;gt; --query 'data.&quot;lifecycle-state&quot;'
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Expected transition times&lt;/strong&gt;: Creating (15-30 min), Stopping (2-5 min), Starting (3-10 min), Restarting (5-15 min), Deleting (10-20 min)&lt;/p&gt;
&lt;h3 id=&quot;db-system-details-page&quot;&gt;DB System Details Page&lt;/h3&gt;
&lt;p&gt;&lt;strong&gt;General Information&lt;/strong&gt;: Name, OCID, compartment, availability domain, MySQL version, HA status&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Configuration&lt;/strong&gt;: Shape, CPU/memory, storage capacity, configuration applied, endpoints/ports&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Networking&lt;/strong&gt;: VCN/subnet, private IP, security lists/NSGs, DNS hostname&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;HeatWave Cluster&lt;/strong&gt; (if attached): State, nodes, shape, memory, Lakehouse status&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Backups&lt;/strong&gt;: Policy settings, retention period, last backup time, PITR window&lt;/p&gt;
&lt;h3 id=&quot;security-best-practices&quot;&gt;Security Best Practices&lt;/h3&gt;
&lt;h4 id=&quot;1-network-security&quot;&gt;1. Network Security&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Deploy in private subnets only&lt;/li&gt;
&lt;li&gt;Security lists: Allow only ports 3306/33060 from known sources&lt;/li&gt;
&lt;li&gt;Use Network Security Groups for granular control&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;2-encryption&quot;&gt;2. Encryption&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;In Transit&lt;/strong&gt;: Always use SSL/TLS, TLS 1.2+&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;At Rest&lt;/strong&gt;: Enabled by default, Oracle-managed keys or BYOK&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;3-credential-management&quot;&gt;3. Credential Management&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Store passwords in OCI Vault&lt;/li&gt;
&lt;li&gt;Use principle of least privilege&lt;/li&gt;
&lt;li&gt;Create separate accounts per application&lt;/li&gt;
&lt;li&gt;Enable automatic password rotation&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;4-access-monitoring&quot;&gt;4. Access Monitoring&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Enable MySQL Enterprise Audit&lt;/li&gt;
&lt;li&gt;Enable VCN flow logs&lt;/li&gt;
&lt;li&gt;Monitor failed login attempts&lt;/li&gt;
&lt;li&gt;Regular audit log reviews&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;troubleshooting-common-issues-1&quot;&gt;Troubleshooting Common Issues&lt;/h3&gt;
&lt;h4 id=&quot;cannot-connect---connection-refused-&quot;&gt;Cannot Connect - &quot;Connection Refused&quot;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Causes&lt;/strong&gt;: Security list not allowing MySQL ports, DB stopped, incorrect IP/port, no network path&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Solutions&lt;/strong&gt;: Verify DB is ACTIVE, check security lists (3306/33060), confirm private IP, test connectivity&lt;/p&gt;
&lt;h4 id=&quot;-access-denied-errors&quot;&gt;&quot;Access Denied&quot; Errors&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Causes&lt;/strong&gt;: Incorrect credentials, user doesn't exist, insufficient privileges&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Solutions&lt;/strong&gt;: Verify credentials, check user exists: &lt;code&gt;SELECT User, Host FROM mysql.user;&lt;/code&gt;, grant privileges&lt;/p&gt;
&lt;h4 id=&quot;-too-many-connections-&quot;&gt;&quot;Too Many Connections&quot;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Causes&lt;/strong&gt;: Application connection leaks, &lt;code&gt;max_connections&lt;/code&gt; limit reached&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Solutions&lt;/strong&gt;: Check connections: &lt;code&gt;SHOW PROCESSLIST;&lt;/code&gt;, increase &lt;code&gt;max_connections&lt;/code&gt;, fix leaks, implement connection pooling&lt;/p&gt;
&lt;h4 id=&quot;slow-connection-establishment&quot;&gt;Slow Connection Establishment&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Causes&lt;/strong&gt;: DNS resolution delays, network latency&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Solutions&lt;/strong&gt;: Use IP instead of hostname, disable reverse DNS lookups, verify VCN routing&lt;/p&gt;
&lt;h3 id=&quot;conclusion&quot;&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;Connecting to and managing MySQL HeatWave DB systems requires understanding networking concepts, endpoint configurations, and lifecycle operations. This guide covered:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;DB system endpoints and network path requirements&lt;/li&gt;
&lt;li&gt;Multiple connection methods (Cloud Shell, Compute Instance, applications)&lt;/li&gt;
&lt;li&gt;Essential lifecycle operations (stop, start, restart, delete)&lt;/li&gt;
&lt;li&gt;DB system states and monitoring&lt;/li&gt;
&lt;li&gt;Security best practices&lt;/li&gt;
&lt;li&gt;Common troubleshooting scenarios&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Whether connecting from Cloud Shell for quick administration or setting up production connectivity, MySQL HeatWave provides flexible, secure options for all your database needs.&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://coderlegion.com/7226/mysql-heatwave-connecting-and-managing-db-systems</guid>
<pubDate>Wed, 12 Nov 2025 09:12:42 +0000</pubDate>
</item>
<item>
<title>MySQL HeatWave: Identifying and Testing Failover in High Availability DB Systems</title>
<link>https://coderlegion.com/7118/mysql-heatwave-identifying-and-testing-failover-in-high-availability-db-systems</link>
<description>&lt;p&gt;In a high availability MySQL HeatWave DB system, automatic failover is a critical mechanism that ensures business continuity when the primary instance becomes unavailable. Understanding how to identify when a failover has occurred and how to properly test failover scenarios is essential for database administrators managing mission-critical applications.&lt;/p&gt;
&lt;p&gt;This guide walks you through recognizing failover events through error messages, understanding the failover process, and implementing best practices for testing failover scenarios without disrupting production systems.&lt;/p&gt;
&lt;h3 id=&quot;understanding-failover-in-high-availability&quot;&gt;Understanding Failover in High Availability&lt;/h3&gt;
&lt;h4 id=&quot;what-is-failover-&quot;&gt;What is Failover?&lt;/h4&gt;
&lt;p&gt;Failover is the automatic process where one of the secondary MySQL instances is promoted to become the new primary instance when the current primary fails or becomes unavailable. The promotion happens automatically without manual intervention, minimizing downtime and ensuring continuous availability.&lt;/p&gt;
&lt;h4 id=&quot;common-causes-of-failover&quot;&gt;Common Causes of Failover&lt;/h4&gt;
&lt;p&gt;Failover can be triggered by several scenarios:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Availability Domain Failure&lt;/strong&gt;: Complete outage of the data center hosting the primary instance&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Primary Database Instance Failure&lt;/strong&gt;: Hardware failure, software crash, or critical system error on the primary instance&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Network Connectivity Issues&lt;/strong&gt;: Loss of network connectivity between the primary instance and the MySQL HeatWave Service management layer&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Block Storage Issues&lt;/strong&gt;: Persistent storage failures affecting the primary instance's ability to read or write data&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Maintenance Activities&lt;/strong&gt;: Certain planned maintenance operations that affect the primary instance&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&quot;the-failover-process&quot;&gt;The Failover Process&lt;/h4&gt;
&lt;p&gt;When failover occurs:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;MySQL HeatWave Service detects the primary instance failure&lt;/li&gt;
&lt;li&gt;One of the secondary instances is automatically selected for promotion&lt;/li&gt;
&lt;li&gt;The selected secondary is promoted to primary status&lt;/li&gt;
&lt;li&gt;The DB system endpoint is reassigned to the newly promoted primary instance&lt;/li&gt;
&lt;li&gt;The IP address remains the same, but all existing connections are closed&lt;/li&gt;
&lt;li&gt;Client applications must reconnect to resume operations&lt;/li&gt;
&lt;li&gt;If a HeatWave cluster was attached, it's automatically recreated and data is reloaded&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;identifying-a-failover-error-messages-and-indicators&quot;&gt;Identifying a Failover: Error Messages and Indicators&lt;/h3&gt;
&lt;h4 id=&quot;primary-indicators-of-failover&quot;&gt;Primary Indicators of Failover&lt;/h4&gt;
&lt;h5 id=&quot;1-console-notification&quot;&gt;1. Console Notification&lt;/h5&gt;
&lt;p&gt;The most straightforward way to verify if a failover has occurred is through the OCI Console:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Steps to Check&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open the navigation menu&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;Databases&lt;/strong&gt; → &lt;strong&gt;HeatWave MySQL&lt;/strong&gt; → &lt;strong&gt;DB Systems&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Choose your compartment from the List Scope&lt;/li&gt;
&lt;li&gt;Click the name of your DB system to open the DB System Details page&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;If a failover has occurred, a message is displayed stating: &quot;Current placement () differs from preferred placement, due to failover or maintenance activity&quot;&lt;/p&gt;
&lt;p&gt;This message indicates that the current primary instance is not in your originally preferred location due to automatic failover.&lt;/p&gt;
&lt;h5 id=&quot;2-mysql-event-notifications&quot;&gt;2. MySQL Event Notifications&lt;/h5&gt;
&lt;p&gt;When a failover happens, a MySQL - Automatic Recovery event is emitted on the DB system with the additionalDetails.isFailover property set to true&lt;/p&gt;
&lt;p&gt;Configure event rules to receive notifications when these events occur.&lt;/p&gt;
&lt;h4 id=&quot;error-messages-during-failover&quot;&gt;Error Messages During Failover&lt;/h4&gt;
&lt;p&gt;When a failover is in progress or has just occurred, applications may encounter various error messages. Understanding these errors helps you identify failover events and implement appropriate retry logic.&lt;/p&gt;
&lt;h5 id=&quot;error-1290-hy000-read-only-mode-error&quot;&gt;Error 1290 (HY000): Read-Only Mode Error&lt;/h5&gt;
&lt;p&gt;&lt;strong&gt;Error Message&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ERROR 1290 (HY000): The MySQL server is running with the --super-read-only option 
so it cannot execute this statement
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;What It Means&lt;/strong&gt;:&lt;br&gt;
This error occurs when attempting to execute write operations (INSERT, UPDATE, DELETE, DDL statements) on an instance that is in super-read-only mode&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;When You'll See It&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;During the brief window when a primary is being demoted to secondary&lt;/li&gt;
&lt;li&gt;If your application still has connections to the old primary after failover&lt;/li&gt;
&lt;li&gt;When attempting writes to a secondary instance&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;What to Do&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Implement connection retry logic in your application&lt;/li&gt;
&lt;li&gt;Close existing connections and reconnect to get routed to the new primary&lt;/li&gt;
&lt;li&gt;Ensure your application uses the DB system endpoint, not instance-specific IPs&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id=&quot;error-3100-hy000-replication-hook-error&quot;&gt;Error 3100 (HY000): Replication Hook Error&lt;/h5&gt;
&lt;p&gt;&lt;strong&gt;Error Message&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ERROR 3100 (HY000): Error on observer while running replication hook 'before_commit'
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;What It Means&lt;/strong&gt;:&lt;br&gt;
This error indicates the system is starting the failover process, and transaction commits are being blocked or rolled back.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Context&lt;/strong&gt;:&lt;br&gt;
This error can also indicate transaction size errors when the message includes &quot;Transaction of size X exceeds specified limit&quot;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;When You'll See It&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;At the beginning of a failover event&lt;/li&gt;
&lt;li&gt;When large transactions exceed the group replication transaction size limit&lt;/li&gt;
&lt;li&gt;During the brief period when the primary instance is being transitioned&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;What to Do&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Transactions in progress will be rolled back automatically&lt;/li&gt;
&lt;li&gt;Implement exponential backoff retry logic&lt;/li&gt;
&lt;li&gt;Reconnect and retry the transaction&lt;/li&gt;
&lt;li&gt;For transaction size errors, break large transactions into smaller batches&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id=&quot;error-2013-hy000-connection-lost-during-query&quot;&gt;Error 2013 (HY000): Connection Lost During Query&lt;/h5&gt;
&lt;p&gt;&lt;strong&gt;Error Message&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;ERROR 2013 (HY000): Lost connection to MySQL server during query
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;What It Means&lt;/strong&gt;:&lt;br&gt;
The connection to the MySQL server was lost while executing a query, typically because the primary instance became unavailable during failover.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;When You'll See It&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;During active failover when the primary instance goes offline&lt;/li&gt;
&lt;li&gt;When long-running queries are interrupted by failover&lt;/li&gt;
&lt;li&gt;During network disruptions affecting the primary&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;What to Do&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Close the broken connection&lt;/li&gt;
&lt;li&gt;Establish a new connection to the DB system endpoint&lt;/li&gt;
&lt;li&gt;Retry the query on the new primary&lt;/li&gt;
&lt;li&gt;Implement idempotent query patterns where possible&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;error-log-indicators&quot;&gt;Error Log Indicators&lt;/h4&gt;
&lt;p&gt;MySQL error logs provide detailed information about failover events. You can query the Performance Schema to view these logs.&lt;/p&gt;
&lt;h5 id=&quot;viewing-error-logs&quot;&gt;Viewing Error Logs&lt;/h5&gt;
&lt;p&gt;Connect to your DB system using MySQL Shell or MySQL Client and run:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;SELECT * FROM performance_schema.error_log 
WHERE SUBSYSTEM = 'Repl' 
ORDER BY LOGGED DESC 
LIMIT 50;
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;key-error-codes-indicating-failover&quot;&gt;Key Error Codes Indicating Failover&lt;/h5&gt;
&lt;p&gt;&lt;strong&gt;MY-013213 and MY-011507: Primary Election Change&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;These errors indicate that a failover has occurred and a secondary instance has been promoted to primary through a Group Replication primary election change&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;MY-011608: Transaction Size Error&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This error indicates a transaction size error where the transaction exceeds the group_replication_transaction_size_limit&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;MY-011566: Super Read-Only Mode Change&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This error indicates that super_read_only has been switched off when an instance is promoted from secondary to primary, or switched on when demoted from primary to secondary.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What It Indicates&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;An instance role change has occurred&lt;/li&gt;
&lt;li&gt;The instance is transitioning between primary and secondary status&lt;/li&gt;
&lt;li&gt;Part of the normal failover process&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;additional-failover-indicators&quot;&gt;Additional Failover Indicators&lt;/h4&gt;
&lt;h5 id=&quot;binary-log-position-differences&quot;&gt;Binary Log Position Differences&lt;/h5&gt;
&lt;p&gt;After a failover, the current binary log file name and position of the new primary may be different from the old primary&lt;/p&gt;
&lt;p&gt;This is because binary logs of each instance are managed independently. Each transaction may be written to different binary log files and positions across instances.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;To Check Binary Log Position&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;SHOW MASTER STATUS;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Compare before and after failover to identify changes.&lt;/p&gt;
&lt;h5 id=&quot;connection-string-behavior&quot;&gt;Connection String Behavior&lt;/h5&gt;
&lt;p&gt;While the DB system endpoint IP address remains constant during failover, all existing connections are terminated and must be re-established. Monitor your application's connection pool for sudden spikes in connection closures and new connection attempts.&lt;/p&gt;
&lt;h3 id=&quot;testing-failover-process-and-best-practices&quot;&gt;Testing Failover: Process and Best Practices&lt;/h3&gt;
&lt;h4 id=&quot;why-test-failover-&quot;&gt;Why Test Failover?&lt;/h4&gt;
&lt;p&gt;Regular failover testing is essential for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Validating your disaster recovery procedures&lt;/li&gt;
&lt;li&gt;Ensuring applications handle failovers gracefully&lt;/li&gt;
&lt;li&gt;Training operations teams on recovery processes&lt;/li&gt;
&lt;li&gt;Identifying configuration issues before real failures occur&lt;/li&gt;
&lt;li&gt;Meeting compliance and audit requirements&lt;/li&gt;
&lt;li&gt;Building confidence in your high availability architecture&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;switchover-vs-failover&quot;&gt;Switchover vs. Failover&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Failover&lt;/strong&gt;: Automatic, unplanned promotion of a secondary to primary due to primary instance failure.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Switchover&lt;/strong&gt;: Manual, planned promotion of a secondary to primary for testing, maintenance, or optimization purposes.&lt;/p&gt;
&lt;p&gt;When you perform a switchover, the preferred placement and current placement change to the newly selected placement of the primary instance, and the DB system endpoint IP address does not change&lt;/p&gt;
&lt;p&gt;Use &lt;strong&gt;switchover&lt;/strong&gt; to safely test failover scenarios without actually causing a failure.&lt;/p&gt;
&lt;h4 id=&quot;step-by-step-failover-testing-process&quot;&gt;Step-by-Step Failover Testing Process&lt;/h4&gt;
&lt;h5 id=&quot;phase-1-set-up-a-test-db-system&quot;&gt;Phase 1: Set Up a Test DB System&lt;/h5&gt;
&lt;p&gt;&lt;strong&gt;Never test failover on production systems during business hours.&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Create a Non-Production HA DB System&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Use a development or staging environment&lt;/li&gt;
&lt;li&gt;Configure it identically to production (same shape, configuration, HA settings)&lt;/li&gt;
&lt;li&gt;Ensure the system has high availability enabled&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Import Representative Data&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Load a production-like dataset&lt;/li&gt;
&lt;li&gt;Include tables with primary keys (HA requirement)&lt;/li&gt;
&lt;li&gt;Consider data sensitivity and masking requirements&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Deploy a Sample Application&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Use a test application that mimics production workload&lt;/li&gt;
&lt;li&gt;Implement connection pooling and retry logic&lt;/li&gt;
&lt;li&gt;Add monitoring and logging capabilities&lt;/li&gt;
&lt;li&gt;Configure the application to use the DB system endpoint&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h5 id=&quot;phase-2-establish-baseline-monitoring&quot;&gt;Phase 2: Establish Baseline Monitoring&lt;/h5&gt;
&lt;p&gt;Before triggering switchover, establish baseline metrics:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Application Performance Metrics&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Query response times&lt;/li&gt;
&lt;li&gt;Transaction throughput&lt;/li&gt;
&lt;li&gt;Connection pool statistics&lt;/li&gt;
&lt;li&gt;Error rates&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Database Metrics&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Active connections&lt;/li&gt;
&lt;li&gt;Current binary log position&lt;/li&gt;
&lt;li&gt;Replication lag (should be minimal in HA systems)&lt;/li&gt;
&lt;li&gt;Current primary instance location&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;System Health Indicators&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;CPU and memory utilization&lt;/li&gt;
&lt;li&gt;Storage I/O metrics&lt;/li&gt;
&lt;li&gt;Network latency between availability domains&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h5 id=&quot;phase-3-execute-switchover&quot;&gt;Phase 3: Execute Switchover&lt;/h5&gt;
&lt;p&gt;Switchover causes a short period of downtime while the primary instance is redirected to the newly promoted instance, requiring all database connections to be reopened&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Using the Console&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Navigate to your DB System details page&lt;/li&gt;
&lt;li&gt;Click the &lt;strong&gt;Actions&lt;/strong&gt; menu&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;Switchover&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Choose the target availability domain or fault domain (different from current)&lt;/li&gt;
&lt;li&gt;Confirm the switchover operation&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Using OCI CLI&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;oci mysql db-system update \
  --db-system-id &amp;lt;YOUR_DB_SYSTEM_OCID&amp;gt; \
  --availability-domain &amp;lt;TARGET_AD&amp;gt; \
  --force
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Modern Switchover Behavior&lt;/strong&gt; (for systems created/upgraded after February 25, 2025):&lt;/p&gt;
&lt;p&gt;New transactions are blocked when switchover is initiated, running transactions are allowed to complete, and uncommitted transactions are rolled back when the connection to the previous primary is broken&lt;/p&gt;
&lt;h5 id=&quot;phase-4-monitor-the-switchover&quot;&gt;Phase 4: Monitor the Switchover&lt;/h5&gt;
&lt;p&gt;&lt;strong&gt;During Switchover&lt;/strong&gt; (typically 30-60 seconds):&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Watch Application Behavior&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Monitor for connection errors (Error 1290, 2013, 3100)&lt;/li&gt;
&lt;li&gt;Observe connection pool drain and refill&lt;/li&gt;
&lt;li&gt;Track any failed transactions&lt;/li&gt;
&lt;li&gt;Verify automatic retry mechanisms&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Check Error Logs&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;SELECT * FROM performance_schema.error_log 
WHERE LOGGED &amp;gt; DATE_SUB(NOW(), INTERVAL 5 MINUTE)
ORDER BY LOGGED DESC;
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Verify HeatWave Cluster Status&lt;/strong&gt; (if applicable)&lt;br&gt;
When current placement changes in a switchover, HeatWave cluster is detached from the previous primary instance and either reused (same AD) or deleted and recreated (different AD)&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;SHOW GLOBAL STATUS LIKE 'rapid_plugin_bootstrapped';
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;After Switchover&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Verify New Primary Location&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Check OCI Console for current placement&lt;/li&gt;
&lt;li&gt;Confirm switchover to target AD/FD succeeded&lt;/li&gt;
&lt;li&gt;Verify &quot;Current placement&quot; matches target&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Validate Application Recovery&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;All connections successfully re-established&lt;/li&gt;
&lt;li&gt;Transaction throughput returns to baseline&lt;/li&gt;
&lt;li&gt;Query performance is consistent&lt;/li&gt;
&lt;li&gt;No persistent error conditions&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Check Data Consistency&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Verify recent transactions completed successfully&lt;/li&gt;
&lt;li&gt;Confirm no data loss occurred&lt;/li&gt;
&lt;li&gt;Test read and write operations&lt;/li&gt;
&lt;li&gt;Validate application state consistency&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h5 id=&quot;phase-5-document-and-analyze&quot;&gt;Phase 5: Document and Analyze&lt;/h5&gt;
&lt;p&gt;&lt;strong&gt;Key Metrics to Record&lt;/strong&gt;:&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;&lt;th&gt;Metric &lt;/th&gt;&lt;th&gt;Before &lt;/th&gt;&lt;th&gt;During &lt;/th&gt;&lt;th&gt;After&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;Total Downtime &lt;/td&gt;&lt;td&gt;N/A &lt;/td&gt;&lt;td&gt;___ sec &lt;/td&gt;&lt;td&gt;N/A&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Connections Dropped &lt;/td&gt;&lt;td&gt;0 &lt;/td&gt;&lt;td&gt;___ &lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Failed Transactions &lt;/td&gt;&lt;td&gt;0 &lt;/td&gt;&lt;td&gt;___ &lt;/td&gt;&lt;td&gt;0&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Recovery Time &lt;/td&gt;&lt;td&gt;N/A &lt;/td&gt;&lt;td&gt;___ sec &lt;/td&gt;&lt;td&gt;N/A&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;strong&gt;Analysis Questions&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Did the application handle failover gracefully?&lt;/li&gt;
&lt;li&gt;Were retry mechanisms effective?&lt;/li&gt;
&lt;li&gt;Did any transactions fail permanently?&lt;/li&gt;
&lt;li&gt;How quickly did the system return to normal operation?&lt;/li&gt;
&lt;li&gt;Were there any unexpected issues?&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;switchover-to-return-to-preferred-placement&quot;&gt;Switchover to Return to Preferred Placement&lt;/h4&gt;
&lt;p&gt;After testing, you can switch back to the original preferred placement:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Option 1: Switchover Back&lt;/strong&gt;&lt;br&gt;
Perform another switchover to return the primary to the original AD/FD.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Option 2: Update Preferred Placement&lt;/strong&gt;&lt;br&gt;
You can switchover to the existing primary instance to change the preferred placement to the current placement with no downtime&lt;/p&gt;
&lt;h3 id=&quot;best-practices-for-handling-failover&quot;&gt;Best Practices for Handling Failover&lt;/h3&gt;
&lt;h4 id=&quot;1-test-on-non-production-systems-first&quot;&gt;1. Test on Non-Production Systems First&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Critical Rule&lt;/strong&gt;: Never test failover on production systems during business hours or peak traffic periods.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why This Matters&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Switchover causes brief downtime (30-60 seconds)&lt;/li&gt;
&lt;li&gt;Connections are forcibly closed&lt;/li&gt;
&lt;li&gt;Uncommitted transactions are rolled back&lt;/li&gt;
&lt;li&gt;Long-running queries may be aborted&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Best Practice&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Maintain a dedicated test environment that mirrors production&lt;/li&gt;
&lt;li&gt;Perform regular failover drills quarterly or bi-annually&lt;/li&gt;
&lt;li&gt;Test during maintenance windows for production validation&lt;/li&gt;
&lt;li&gt;Document all test results and improvements made&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;2-use-switchover-to-simulate-failover&quot;&gt;2. Use Switchover to Simulate Failover&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Recommendation&lt;/strong&gt;: Use manual switchover operations to test disaster recovery procedures rather than artificially creating failures.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Benefits&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Controlled, predictable process&lt;/li&gt;
&lt;li&gt;Ability to schedule during low-traffic periods&lt;/li&gt;
&lt;li&gt;Minimizes risk of actual data loss&lt;/li&gt;
&lt;li&gt;Provides clean before/after states for analysis&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Testing Scenarios&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Same AD, Different Fault Domain&lt;/strong&gt;: Minimal impact, tests intra-datacenter failover&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Different AD&lt;/strong&gt;: Simulates datacenter failure, tests cross-AD latency and behavior&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;With Active HeatWave Cluster&lt;/strong&gt;: Tests analytics workload recovery&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Under Load&lt;/strong&gt;: Tests failover during peak transaction volume&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&quot;3-implement-robust-application-level-retry-logic&quot;&gt;3. Implement Robust Application-Level Retry Logic&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Connection Retry Pattern&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-python&quot;&gt;import time
import mysql.connector
from mysql.connector import Error

def connect_with_retry(max_retries=5, base_delay=1):
    for attempt in range(max_retries):
        try:
            connection = mysql.connector.connect(
                host='&amp;lt;DB_SYSTEM_ENDPOINT&amp;gt;',
                database='your_database',
                user='admin',
                password='your_password',
                connect_timeout=10
            )
            return connection
        except Error as e:
            if attempt == max_retries - 1:
                raise
            delay = base_delay * (2 ** attempt)
            print(f&quot;Connection failed: {e}. Retrying in {delay}s...&quot;)
            time.sleep(delay)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Key Principles&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Always use the DB system endpoint, never instance-specific IPs&lt;/li&gt;
&lt;li&gt;Implement exponential backoff (1s, 2s, 4s, 8s, 16s)&lt;/li&gt;
&lt;li&gt;Limit retry attempts to avoid infinite loops&lt;/li&gt;
&lt;li&gt;Make transactions idempotent when possible&lt;/li&gt;
&lt;li&gt;Log all retry attempts for monitoring&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;4-move-primary-back-after-unplanned-failover&quot;&gt;4. Move Primary Back After Unplanned Failover&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;After an automatic failover occurs in production&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;The current placement differs from the preferred placement, and a message is displayed indicating &quot;Current placement differs from preferred placement, due to failover or maintenance activity&quot;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Decision Points&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Option A: Leave in New Location&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;System is stable and operational&lt;/li&gt;
&lt;li&gt;Performance is acceptable&lt;/li&gt;
&lt;li&gt;No immediate reason to change&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Option B: Switchover Back to Preferred Location&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Original location has specific advantages&lt;/li&gt;
&lt;li&gt;Schedule switchover during next maintenance window&lt;/li&gt;
&lt;li&gt;Perform during low-traffic period&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Best Practice&lt;/strong&gt;: Don't rush to move back immediately after failover. Validate the stability of the current state first, then plan a controlled switchover during a maintenance window.&lt;/p&gt;
&lt;h4 id=&quot;5-configure-connection-timeouts-appropriately&quot;&gt;5. Configure Connection Timeouts Appropriately&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Recommended Settings&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;SET GLOBAL connect_timeout = 10;
SET GLOBAL interactive_timeout = 28800;
SET GLOBAL wait_timeout = 28800;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;For Applications Using PrivateLink&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Set shorter &lt;code&gt;connect_timeout&lt;/code&gt; values (5 seconds)&lt;/li&gt;
&lt;li&gt;Implement aggressive retry logic&lt;/li&gt;
&lt;li&gt;Failovers and switchovers take longer when using Query PrivateLink endpoints&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;6-test-with-heatwave-cluster&quot;&gt;6. Test with HeatWave Cluster&lt;/h4&gt;
&lt;p&gt;If your DB system has a HeatWave cluster attached:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Additional Considerations&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Cluster Behavior During Switchover&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If new primary is in the same AD as previous primary, the existing HeatWave cluster is reused and reattached&lt;/li&gt;
&lt;li&gt;If new primary is in a different AD, the existing HeatWave cluster is deleted and a new one created&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Data Reload&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Tables are automatically reloaded from HeatWave Storage Layer&lt;/li&gt;
&lt;li&gt;Monitor reload progress: &lt;code&gt;SHOW GLOBAL STATUS LIKE 'rapid%';&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Long-Running Queries&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;When current placement changes in a switchover, long-running queries offloaded to HeatWave cluster can get aborted&lt;/li&gt;
&lt;li&gt;Reconnect and rerun queries after cluster is ready&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;key-takeaways-1&quot;&gt;Key Takeaways&lt;/h3&gt;
&lt;p&gt;Identifying and testing failover in MySQL HeatWave high availability DB systems is a critical skill for database administrators and DevOps teams. By understanding the error messages that indicate failover, implementing proper monitoring, and regularly testing switchover scenarios in non-production environments, you can ensure your applications handle failover gracefully with minimal disruption.&lt;/p&gt;
&lt;p&gt;Key takeaways:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Recognize failover indicators&lt;/strong&gt;: Watch for specific error codes (1290, 3100, 2013) and console messages&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use switchover for testing&lt;/strong&gt;: Never test on production; use manual switchover to simulate failover safely&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monitor thoroughly&lt;/strong&gt;: Track error logs, transaction status, and application behavior&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Implement retry logic&lt;/strong&gt;: Applications must handle connection failures and transaction rollbacks gracefully&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Plan recovery&lt;/strong&gt;: After automatic failover, assess whether to switch back during a maintenance window&lt;/li&gt;
&lt;/ol&gt;
</description>
<category>mysql</category>
<guid isPermaLink="true">https://coderlegion.com/7118/mysql-heatwave-identifying-and-testing-failover-in-high-availability-db-systems</guid>
<pubDate>Mon, 10 Nov 2025 10:01:57 +0000</pubDate>
</item>
<item>
<title>MySQL HeatWave: Creating High Availability DB Systems and Understanding Limitations</title>
<link>https://coderlegion.com/7074/mysql-heatwave-creating-high-availability-db-systems-and-understanding-limitations</link>
<description>&lt;h2 id=&quot;mysql-heatwave-creating-high-availability-db-systems-and-understanding-limitations&quot;&gt;MySQL HeatWave: Creating High Availability DB Systems and Understanding Limitations&lt;/h2&gt;
&lt;h3 id=&quot;introduction-1&quot;&gt;Introduction&lt;/h3&gt;
&lt;p&gt;MySQL HeatWave offers enterprise-grade high availability features that ensure your database remains operational even during hardware failures or maintenance events. Understanding how to properly configure high availability and its associated limitations is crucial for designing resilient database architectures.&lt;/p&gt;
&lt;p&gt;This guide walks you through creating a high availability DB system and explores the important limitations you should consider when planning your deployment.&lt;/p&gt;
&lt;h3 id=&quot;creating-a-high-availability-db-system&quot;&gt;Creating a High Availability DB System&lt;/h3&gt;
&lt;h4 id=&quot;overview-of-the-creation-process&quot;&gt;Overview of the Creation Process&lt;/h4&gt;
&lt;p&gt;Creating a high availability DB system in MySQL HeatWave follows a structured workflow with three main phases:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Set Up Basic DB System Configuration&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Specify Database and Infrastructure Details&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Configure Backup and Advanced Options&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Let's explore each phase in detail.&lt;/p&gt;
&lt;h3 id=&quot;phase-1-set-up-basic-db-system-configuration&quot;&gt;Phase 1: Set Up Basic DB System Configuration&lt;/h3&gt;
&lt;h4 id=&quot;step-1-access-the-console&quot;&gt;Step 1: Access the Console&lt;/h4&gt;
&lt;p&gt;Log in to your Oracle Cloud Infrastructure (OCI) console or MySQL HeatWave on AWS console at the respective portal.&lt;/p&gt;
&lt;h4 id=&quot;step-2-navigate-to-db-systems&quot;&gt;Step 2: Navigate to DB Systems&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Open the navigation menu&lt;/li&gt;
&lt;li&gt;Under &lt;strong&gt;Databases&lt;/strong&gt;, select &lt;strong&gt;HeatWave MySQL&lt;/strong&gt; (OCI) or &lt;strong&gt;MySQL HeatWave&lt;/strong&gt; (AWS)&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;DB Systems&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Create DB System&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;step-3-choose-deployment-template&quot;&gt;Step 3: Choose Deployment Template&lt;/h4&gt;
&lt;p&gt;Select the &lt;strong&gt;Production&lt;/strong&gt; template, which automatically configures your system for high availability with recommended settings for production workloads.&lt;/p&gt;
&lt;p&gt;Alternatively, you can start with &lt;strong&gt;Development or Testing&lt;/strong&gt; and manually enable high availability later.&lt;/p&gt;
&lt;h4 id=&quot;step-4-basic-configuration&quot;&gt;Step 4: Basic Configuration&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Compartment&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Select the compartment where the DB system will reside&lt;/li&gt;
&lt;li&gt;Compartments help organize resources and control access&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Name Your DB System&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Display Name&lt;/strong&gt;: Provide a meaningful name (e.g., &quot;prod-mysql-ha-primary&quot;)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Description&lt;/strong&gt;: (Optional) Add details about the system's purpose&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Database System Type&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Ensure &quot;High Availability&quot; is selected if using the Production template&lt;/li&gt;
&lt;li&gt;For manual setup, you can enable this option here&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;phase-2-specify-database-information&quot;&gt;Phase 2: Specify Database Information&lt;/h3&gt;
&lt;h4 id=&quot;administrator-credentials&quot;&gt;Administrator Credentials&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Username Configuration&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Specify the administrator username (default is typically &quot;admin&quot;)&lt;/li&gt;
&lt;li&gt;Avoid reserved usernames like &quot;root&quot;, &quot;mysql&quot;, &quot;sys&quot;&lt;/li&gt;
&lt;li&gt;Username can be up to 32 characters&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Password Requirements&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Must be 8-32 characters long&lt;/li&gt;
&lt;li&gt;Include at least one:&lt;ul&gt;
&lt;li&gt;Uppercase letter&lt;/li&gt;
&lt;li&gt;Lowercase letter  &lt;/li&gt;
&lt;li&gt;Number&lt;/li&gt;
&lt;li&gt;Special character from: &lt;code&gt;,.~-+*;:_!&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Store credentials securely (consider OCI Vault or AWS Secrets Manager)&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;network-configuration&quot;&gt;Network Configuration&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Virtual Cloud Network (VCN)&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Select an existing VCN or create a new one&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Subnet&lt;/strong&gt;: Choose a &lt;strong&gt;private subnet&lt;/strong&gt; for enhanced security&lt;/li&gt;
&lt;li&gt;Public subnets are not recommended for production databases&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Availability Domain Selection&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Choose the &lt;strong&gt;preferred&lt;/strong&gt; availability domain for your primary instance&lt;/li&gt;
&lt;li&gt;This becomes your preferred placement&lt;/li&gt;
&lt;li&gt;The system will automatically distribute secondary instances across different ADs or fault domains&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Security Configuration&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Ensure security lists or network security groups allow:&lt;ul&gt;
&lt;li&gt;Port &lt;strong&gt;3306&lt;/strong&gt; for MySQL connections&lt;/li&gt;
&lt;li&gt;Port &lt;strong&gt;33060&lt;/strong&gt; for MySQL X Protocol&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Restrict source CIDR blocks to known application IP ranges&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;hardware-configuration-shape-&quot;&gt;Hardware Configuration (Shape)&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Select DB System Shape&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Choose a shape that meets your performance requirements:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;ECPU Shapes (Recommended)&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Architecture-agnostic and future-proof&lt;/li&gt;
&lt;li&gt;Examples: MySQL.8, MySQL.16, MySQL.32, MySQL.64, MySQL.128, MySQL.256&lt;/li&gt;
&lt;li&gt;Can be changed after deployment&lt;/li&gt;
&lt;li&gt;Support high availability and HeatWave clusters&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Shape Characteristics&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Defines CPU count, memory, and network bandwidth&lt;/li&gt;
&lt;li&gt;Higher shapes provide better performance but cost more&lt;/li&gt;
&lt;li&gt;Use Autopilot Shape Advisor for recommendations based on workload&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Important&lt;/strong&gt;: All OCPU shapes are deprecated and unavailable to new users created after September 5, 2024. Existing OCPU shapes will be unavailable after March 13, 2026.&lt;/p&gt;
&lt;h4 id=&quot;storage-configuration&quot;&gt;Storage Configuration&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Data Storage Size&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Minimum: 50 GB&lt;/li&gt;
&lt;li&gt;Maximum: 131,072 GB (128 TB)&lt;/li&gt;
&lt;li&gt;Plan for current data plus growth projections&lt;/li&gt;
&lt;li&gt;Storage can only be increased, never decreased&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Automatic Storage Expansion&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Recommended&lt;/strong&gt;: Enable this feature&lt;/li&gt;
&lt;li&gt;Automatically increases storage when usage approaches limits&lt;/li&gt;
&lt;li&gt;Prevents downtime due to storage exhaustion&lt;/li&gt;
&lt;li&gt;Based on Health Monitor read-only thresholds&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Storage Performance&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Higher storage allocations provide better IOPS&lt;/li&gt;
&lt;li&gt;Storage is backed by high-performance block storage&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;phase-3-configure-backups&quot;&gt;Phase 3: Configure Backups&lt;/h3&gt;
&lt;h4 id=&quot;enable-automatic-backups&quot;&gt;Enable Automatic Backups&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Why Backups Matter&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Protects against data loss&lt;/li&gt;
&lt;li&gt;Enables point-in-time recovery&lt;/li&gt;
&lt;li&gt;Required for disaster recovery planning&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Backup Configuration Options&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Enable Automatic Backups&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Toggle: &lt;strong&gt;ON&lt;/strong&gt; (highly recommended for HA systems)&lt;/li&gt;
&lt;li&gt;Backups run automatically at scheduled times&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Backup Retention Period&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Range: 1 to 35 days&lt;/li&gt;
&lt;li&gt;Recommended: At least 7 days for production&lt;/li&gt;
&lt;li&gt;Longer retention = higher storage costs but better recovery options&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Backup Window Selection&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Choose a time when database activity is lowest&lt;/li&gt;
&lt;li&gt;Typically during off-peak hours (e.g., 2:00 AM - 4:00 AM)&lt;/li&gt;
&lt;li&gt;Avoid peak transaction periods to minimize performance impact&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Point-in-Time Recovery (PITR)&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Enable to restore to any point within retention period&lt;/li&gt;
&lt;li&gt;Uses binary logs for granular recovery&lt;/li&gt;
&lt;li&gt;Essential for recovering from accidental data modifications&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Regional Backup Copy&lt;/strong&gt; (OCI only)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Schedule automatic backup copies to another OCI region&lt;/li&gt;
&lt;li&gt;Provides geographic redundancy&lt;/li&gt;
&lt;li&gt;Protects against regional disasters&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;advanced-backup-options&quot;&gt;Advanced Backup Options&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Backup Validation&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Verifies backup integrity&lt;/li&gt;
&lt;li&gt;Ensures backups are restorable&lt;/li&gt;
&lt;li&gt;Available on supported MySQL versions&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Soft Delete for Backups&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Enabled by default&lt;/li&gt;
&lt;li&gt;Backups remain in DELETED state before permanent deletion&lt;/li&gt;
&lt;li&gt;Provides grace period for recovery of accidentally deleted backups&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;additional-configuration-options&quot;&gt;Additional Configuration Options&lt;/h3&gt;
&lt;h4 id=&quot;heatwave-cluster-configuration-optional-&quot;&gt;HeatWave Cluster Configuration (Optional)&lt;/h4&gt;
&lt;p&gt;If you need analytics capabilities:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Enable HeatWave Cluster&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Checkbox: Select to add analytics processing&lt;/li&gt;
&lt;li&gt;Choose HeatWave node shape (HeatWave.512GB, HeatWave.256GB, HeatWave.128GB)&lt;/li&gt;
&lt;li&gt;Specify number of nodes (1 to 512 depending on shape and region)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Important HA Consideration&lt;/strong&gt;: On OCI, HeatWave clusters are fully supported with high availability. On AWS, HeatWave features (including Lakehouse, GenAI, and AutoML) are currently not supported on HA DB systems.&lt;/p&gt;
&lt;h4 id=&quot;mysql-configuration&quot;&gt;MySQL Configuration&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Configuration Selection&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Use default HA-compatible configuration (recommended)&lt;/li&gt;
&lt;li&gt;Configurations with &quot;HA&quot; suffix support high availability&lt;/li&gt;
&lt;li&gt;Custom configurations must be based on HA-compatible templates&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Configuration Characteristics&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Defines system variables and initialization parameters&lt;/li&gt;
&lt;li&gt;Can be changed after deployment with rolling restarts&lt;/li&gt;
&lt;li&gt;Affects memory allocation, connection limits, and performance tuning&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;tagging-optional-&quot;&gt;Tagging (Optional)&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Resource Tags&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Add metadata for organization&lt;/li&gt;
&lt;li&gt;Enable cost tracking and allocation&lt;/li&gt;
&lt;li&gt;Support automation and bulk operations&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Tag Types&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Defined Tags&lt;/strong&gt;: Created by administrators with controlled vocabularies&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Free-form Tags&lt;/strong&gt;: Simple key-value pairs for flexible labeling&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;finalizing-creation&quot;&gt;Finalizing Creation&lt;/h3&gt;
&lt;h4 id=&quot;review-configuration&quot;&gt;Review Configuration&lt;/h4&gt;
&lt;p&gt;Before creating:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Verify all settings are correct&lt;/li&gt;
&lt;li&gt;Check estimated monthly cost&lt;/li&gt;
&lt;li&gt;Ensure network connectivity is properly configured&lt;/li&gt;
&lt;li&gt;Confirm backup settings meet compliance requirements&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;create-db-system&quot;&gt;Create DB System&lt;/h4&gt;
&lt;p&gt;Click &lt;strong&gt;Create&lt;/strong&gt; to provision your high availability DB system.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Provisioning Timeline&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;DB system enters &lt;strong&gt;CREATING&lt;/strong&gt; state&lt;/li&gt;
&lt;li&gt;Typical creation time: 15-30 minutes for HA systems&lt;/li&gt;
&lt;li&gt;Three instances are provisioned across availability/fault domains&lt;/li&gt;
&lt;li&gt;Status changes to &lt;strong&gt;ACTIVE&lt;/strong&gt; when ready&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;What Happens During Creation&lt;/strong&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Primary instance is provisioned in preferred placement&lt;/li&gt;
&lt;li&gt;Two secondary instances created in different domains&lt;/li&gt;
&lt;li&gt;MySQL Group Replication is configured automatically&lt;/li&gt;
&lt;li&gt;Initial backup is taken (if enabled)&lt;/li&gt;
&lt;li&gt;Monitoring and health checks are activated&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;understanding-high-availability-limitations&quot;&gt;Understanding High Availability Limitations&lt;/h3&gt;
&lt;p&gt;While MySQL HeatWave high availability provides robust fault tolerance, it's important to understand its limitations to design systems appropriately.&lt;/p&gt;
&lt;h4 id=&quot;1-rolling-upgrades-and-brief-downtime&quot;&gt;1. Rolling Upgrades and Brief Downtime&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Characteristic&lt;/strong&gt;: High availability DB systems require rolling upgrades for maintenance, during which there is a brief period of downtime before the newly promoted MySQL instance resumes connections.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What This Means&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;During maintenance, instances are upgraded one at a time&lt;/li&gt;
&lt;li&gt;When the primary instance is upgraded, a failover occurs&lt;/li&gt;
&lt;li&gt;Connection strings remain the same, but applications must reconnect&lt;/li&gt;
&lt;li&gt;Downtime is typically measured in seconds, not minutes&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Best Practice&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Implement connection retry logic in applications&lt;/li&gt;
&lt;li&gt;Use connection pooling with automatic reconnection&lt;/li&gt;
&lt;li&gt;Schedule maintenance during low-traffic periods&lt;/li&gt;
&lt;li&gt;Test application behavior during failovers&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;2-mysql-version-requirements&quot;&gt;2. MySQL Version Requirements&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Limitation&lt;/strong&gt;: High availability is only supported for MySQL version 8.0.24 or higher.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Implications&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Older MySQL versions cannot use HA features&lt;/li&gt;
&lt;li&gt;Must upgrade to 8.0.24+ before enabling high availability&lt;/li&gt;
&lt;li&gt;Consider upgrading to MySQL 8.4.x (LTS) or 9.x (Innovation) for latest features&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Migration Path&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Upgrade standalone DB system to 8.0.24 or higher&lt;/li&gt;
&lt;li&gt;Ensure all prerequisites are met (primary keys, etc.)&lt;/li&gt;
&lt;li&gt;Enable high availability after upgrade completes&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&quot;3-direct-access-limitations&quot;&gt;3. Direct Access Limitations&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Limitation&lt;/strong&gt;: You can only access the primary MySQL instance directly; the two secondary instances cannot be accessed using MySQL Shell or any other client.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why This Matters&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Cannot distribute read load across secondary instances for HA systems&lt;/li&gt;
&lt;li&gt;All connections go through the primary instance&lt;/li&gt;
&lt;li&gt;Read replicas are separate feature for read scaling (not part of HA)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Alternative Solutions&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Use &lt;strong&gt;Read Replicas&lt;/strong&gt; for read scaling (separate from HA)&lt;/li&gt;
&lt;li&gt;Read replicas can be created on HA or standalone systems&lt;/li&gt;
&lt;li&gt;Offload analytics queries to HeatWave cluster instead&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;4-transaction-size-limits-based-on-shape-memory&quot;&gt;4. Transaction Size Limits Based on Shape Memory&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Limitation&lt;/strong&gt;: The maximum transaction size depends on the amount of memory of the shape.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Transaction Size Limits by Shape&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Smaller shapes have lower transaction size limits&lt;/li&gt;
&lt;li&gt;Larger transactions require more memory for Group Replication&lt;/li&gt;
&lt;li&gt;Exceeding limits causes transaction failure&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Example Limits&lt;/strong&gt; (approximate):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;MySQL.8 (8 ECPU, 128 GB RAM): ~2 GB transaction limit&lt;/li&gt;
&lt;li&gt;MySQL.16 (16 ECPU, 256 GB RAM): ~4 GB transaction limit&lt;/li&gt;
&lt;li&gt;MySQL.32 (32 ECPU, 512 GB RAM): ~8 GB transaction limit&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Workarounds&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Break large transactions into smaller batches&lt;/li&gt;
&lt;li&gt;Use bulk loading features with smaller commit sizes&lt;/li&gt;
&lt;li&gt;Select appropriate shape for your transaction patterns&lt;/li&gt;
&lt;li&gt;Consider upgrading shape if hitting limits regularly&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;5-heatwave-cluster-operations-and-ha-changes&quot;&gt;5. HeatWave Cluster Operations and HA Changes&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Limitation&lt;/strong&gt;: If a HeatWave cluster load or reload operation is ongoing, enabling or disabling high availability can fail.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why This Happens&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;HeatWave cluster operations lock resources during data loading&lt;/li&gt;
&lt;li&gt;HA changes require cluster reconfiguration&lt;/li&gt;
&lt;li&gt;Concurrent operations can cause conflicts&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Best Practice&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Wait for HeatWave operations to complete before HA changes&lt;/li&gt;
&lt;li&gt;Monitor HeatWave operation status&lt;/li&gt;
&lt;li&gt;Schedule HA changes during maintenance windows&lt;/li&gt;
&lt;li&gt;Avoid simultaneous infrastructure and data operations&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;6-heatwave-lakehouse-compatibility&quot;&gt;6. HeatWave Lakehouse Compatibility&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Previous Limitation&lt;/strong&gt;: Prior to MySQL 8.3.0-u2, you could not enable high availability on a DB system with HeatWave Lakehouse enabled.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Current Status&lt;/strong&gt;: This limitation has been lifted in MySQL 8.3.0-u2 and later versions.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Upgrade Path&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Systems on older versions must upgrade to use HA with Lakehouse&lt;/li&gt;
&lt;li&gt;After upgrade, both features can coexist&lt;/li&gt;
&lt;li&gt;On OCI, full support is available&lt;/li&gt;
&lt;li&gt;On AWS, HeatWave features remain unsupported on HA systems&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;7-platform-specific-limitations&quot;&gt;7. Platform-Specific Limitations&lt;/h4&gt;
&lt;h5 id=&quot;mysql-heatwave-on-aws&quot;&gt;MySQL HeatWave on AWS&lt;/h5&gt;
&lt;p&gt;On AWS, MySQL HeatWave Clusters and features requiring a cluster (MySQL HeatWave Lakehouse, GenAI, AutoML) are not currently supported on high availability DB systems.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Impact&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;HA systems on AWS are limited to OLTP workloads&lt;/li&gt;
&lt;li&gt;Analytics features require standalone systems&lt;/li&gt;
&lt;li&gt;Must choose between HA and advanced analytics on AWS&lt;/li&gt;
&lt;/ul&gt;
&lt;h5 id=&quot;query-privatelink-considerations&quot;&gt;Query PrivateLink Considerations&lt;/h5&gt;
&lt;p&gt;When using Query PrivateLink endpoints, failovers and switchovers take longer than on public endpoints.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Mitigation&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Set &lt;code&gt;connect_timeout&lt;/code&gt; to small value (e.g., 5 seconds)&lt;/li&gt;
&lt;li&gt;Implement aggressive connection retry logic&lt;/li&gt;
&lt;li&gt;Monitor failover times&lt;/li&gt;
&lt;li&gt;Consider public endpoints for latency-sensitive applications&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;8-configuration-and-infrastructure-limitations&quot;&gt;8. Configuration and Infrastructure Limitations&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Bulk Ingest&lt;/strong&gt;: The Bulk Ingest feature is not supported on high availability DB systems.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Alternative&lt;/strong&gt;: Use standard data loading methods like &lt;code&gt;LOAD DATA INFILE&lt;/code&gt; or MySQL Shell utilities.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;PrivateLink Management&lt;/strong&gt;: High availability cannot be enabled or disabled on a DB system with PrivateLink(s) configured.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Workaround&lt;/strong&gt;: Delete PrivateLinks, make HA changes, then recreate PrivateLinks.&lt;/p&gt;
&lt;h4 id=&quot;9-rolling-restart-for-configuration-changes&quot;&gt;9. Rolling Restart for Configuration Changes&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Behavior&lt;/strong&gt;: When updating configuration of a high availability DB system that changes only dynamic variables, a rolling restart is performed, which shortens downtime and causes a change in current primary placement.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;What Happens&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Configuration updated on primary instance&lt;/li&gt;
&lt;li&gt;Controlled failover to secondary instance&lt;/li&gt;
&lt;li&gt;Original primary updated and becomes secondary&lt;/li&gt;
&lt;li&gt;System automatically rebalances if needed&lt;/li&gt;
&lt;li&gt;HeatWave data reloaded automatically if cluster attached&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;Implications&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Brief connection interruption during rolling restart&lt;/li&gt;
&lt;li&gt;Current placement may differ from preferred placement&lt;/li&gt;
&lt;li&gt;Applications must handle reconnections&lt;/li&gt;
&lt;li&gt;HeatWave queries may be briefly unavailable during reload&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;best-practices-for-ha-db-systems&quot;&gt;Best Practices for HA DB Systems&lt;/h3&gt;
&lt;h4 id=&quot;1-application-design&quot;&gt;1. Application Design&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Connection Management&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Implement exponential backoff for reconnection attempts&lt;/li&gt;
&lt;li&gt;Use connection pooling with health checks&lt;/li&gt;
&lt;li&gt;Set appropriate timeout values&lt;/li&gt;
&lt;li&gt;Handle transient errors gracefully&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Transaction Design&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Keep transactions small and fast&lt;/li&gt;
&lt;li&gt;Avoid long-running transactions that span minutes&lt;/li&gt;
&lt;li&gt;Break large data modifications into batches&lt;/li&gt;
&lt;li&gt;Monitor transaction sizes against shape limits&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;2-monitoring-and-alerting&quot;&gt;2. Monitoring and Alerting&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Key Metrics to Monitor&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Replication lag between primary and secondary instances&lt;/li&gt;
&lt;li&gt;Storage utilization and growth trends&lt;/li&gt;
&lt;li&gt;Transaction throughput and latency&lt;/li&gt;
&lt;li&gt;Failover events and frequency&lt;/li&gt;
&lt;li&gt;Backup success rates&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Set Up Alerts For&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Failover events&lt;/li&gt;
&lt;li&gt;High replication lag&lt;/li&gt;
&lt;li&gt;Storage approaching limits&lt;/li&gt;
&lt;li&gt;Backup failures&lt;/li&gt;
&lt;li&gt;Configuration change events&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;3-testing-and-validation&quot;&gt;3. Testing and Validation&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Regular Testing&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Perform manual switchovers during maintenance windows&lt;/li&gt;
&lt;li&gt;Test application behavior during failovers&lt;/li&gt;
&lt;li&gt;Validate backup and restore procedures&lt;/li&gt;
&lt;li&gt;Verify monitoring and alerting systems&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Chaos Engineering&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Simulate instance failures&lt;/li&gt;
&lt;li&gt;Test network partition scenarios&lt;/li&gt;
&lt;li&gt;Validate automatic recovery mechanisms&lt;/li&gt;
&lt;li&gt;Document recovery procedures&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;4-maintenance-planning&quot;&gt;4. Maintenance Planning&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Scheduling&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Plan configuration changes during low-traffic periods&lt;/li&gt;
&lt;li&gt;Coordinate with application teams for maintenance windows&lt;/li&gt;
&lt;li&gt;Avoid changes during critical business periods&lt;/li&gt;
&lt;li&gt;Document rollback procedures&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Pre-Change Validation&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Test configuration changes in non-production first&lt;/li&gt;
&lt;li&gt;Verify compatibility with HA requirements&lt;/li&gt;
&lt;li&gt;Ensure backups are current&lt;/li&gt;
&lt;li&gt;Have rollback plan ready&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;5-cost-optimization&quot;&gt;5. Cost Optimization&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Resource Planning&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Start with appropriate shape size&lt;/li&gt;
&lt;li&gt;Monitor utilization with Autopilot Shape Advisor&lt;/li&gt;
&lt;li&gt;Adjust shapes based on actual workload patterns&lt;/li&gt;
&lt;li&gt;Balance performance needs with cost constraints&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Backup Management&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Set retention periods based on compliance requirements&lt;/li&gt;
&lt;li&gt;Use regional backup copies only when needed&lt;/li&gt;
&lt;li&gt;Enable backup validation selectively&lt;/li&gt;
&lt;li&gt;Clean up old backups per policy&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;when-not-to-use-high-availability&quot;&gt;When NOT to Use High Availability&lt;/h3&gt;
&lt;p&gt;While high availability is excellent for many use cases, it may not be appropriate when:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Development/Testing&lt;/strong&gt;: Standalone systems are more cost-effective&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Analytics-Heavy on AWS&lt;/strong&gt;: HA doesn't support HeatWave features on AWS&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Very Large Transactions&lt;/strong&gt;: Shape memory limits may be restrictive&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Budget Constraints&lt;/strong&gt;: HA requires 3x compute resources vs standalone&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Read-Heavy Workloads&lt;/strong&gt;: Read replicas might be more appropriate than HA&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;alternative-high-availability-strategies&quot;&gt;Alternative High Availability Strategies&lt;/h3&gt;
&lt;p&gt;If MySQL HeatWave HA limitations are too restrictive:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Read Replicas for Read Scaling&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Distribute read traffic across multiple instances&lt;/li&gt;
&lt;li&gt;Works with both standalone and HA systems&lt;/li&gt;
&lt;li&gt;Up to 10 read replicas per DB system&lt;/li&gt;
&lt;li&gt;Better for read-heavy workloads&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Multi-Region Deployment&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Deploy separate DB systems in different regions&lt;/li&gt;
&lt;li&gt;Use application-level failover logic&lt;/li&gt;
&lt;li&gt;Replicate data using MySQL replication channels&lt;/li&gt;
&lt;li&gt;Provides geographic redundancy&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Hybrid Architectures&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Use HA for OLTP workloads&lt;/li&gt;
&lt;li&gt;Separate standalone system with HeatWave for analytics (AWS)&lt;/li&gt;
&lt;li&gt;Replicate data between systems using channels&lt;/li&gt;
&lt;li&gt;Best of both worlds but adds complexity&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;conclusion-1&quot;&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;MySQL HeatWave high availability provides enterprise-grade fault tolerance with automatic failover, data protection, and minimal downtime. Understanding the limitations—particularly around rolling upgrades, transaction sizes, and platform-specific constraints—is essential for designing robust database architectures.&lt;/p&gt;
&lt;p&gt;By following best practices for application design, monitoring, and maintenance, you can build resilient systems that meet stringent uptime requirements while staying within the boundaries of high availability limitations.&lt;/p&gt;
&lt;p&gt;The key is matching your requirements to the capabilities: if you need maximum uptime for OLTP workloads with automatic failover, MySQL HeatWave HA is an excellent choice. If you need advanced analytics features on AWS or have very specific requirements, consider alternative architectures that better fit your needs.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Additional Resources&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&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 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/ha-overview.html&quot;&gt;High Availability Architecture Guide&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://dev.mysql.com/doc/refman/8.0/en/group-replication.html&quot;&gt;MySQL Group Replication Documentation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
</description>
<category>mysql</category>
<guid isPermaLink="true">https://coderlegion.com/7074/mysql-heatwave-creating-high-availability-db-systems-and-understanding-limitations</guid>
<pubDate>Fri, 07 Nov 2025 14:01:41 +0000</pubDate>
</item>
<item>
<title>MySQL HeatWave: Creating DB Systems and High Availability Setup</title>
<link>https://coderlegion.com/7029/mysql-heatwave-creating-db-systems-and-high-availability-setup</link>
<description>&lt;h2 id=&quot;mysql-heatwave-creating-db-systems-and-high-availability-setup&quot;&gt;MySQL HeatWave: Creating DB Systems and High Availability Setup&lt;/h2&gt;
&lt;h3 id=&quot;introduction-2&quot;&gt;Introduction&lt;/h3&gt;
&lt;p&gt;MySQL HeatWave is Oracle's fully managed database service that combines transactional and analytical workloads in a single platform. This guide walks you through creating a MySQL HeatWave DB System and implementing high availability for enterprise-grade reliability.&lt;/p&gt;
&lt;h3 id=&quot;creating-a-mysql-heatwave-db-system&quot;&gt;Creating a MySQL HeatWave DB System&lt;/h3&gt;
&lt;h4 id=&quot;step-1-access-oci-console&quot;&gt;Step 1: Access OCI Console&lt;/h4&gt;
&lt;p&gt;Log in to your Oracle Cloud Infrastructure (OCI) console at cloud.oracle.com with your credentials.&lt;/p&gt;
&lt;h4 id=&quot;step-2-navigate-to-db-systems-1&quot;&gt;Step 2: Navigate to DB Systems&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;Open the navigation menu (hamburger icon)&lt;/li&gt;
&lt;li&gt;Under &lt;strong&gt;Databases&lt;/strong&gt;, select &lt;strong&gt;HeatWave MySQL&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;DB Systems&lt;/strong&gt; from the menu&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&quot;step-3-initiate-db-system-creation&quot;&gt;Step 3: Initiate DB System Creation&lt;/h4&gt;
&lt;p&gt;Click the &lt;strong&gt;Create DB System&lt;/strong&gt; button. This opens the Create DB System dialog with several configuration options.&lt;/p&gt;
&lt;h4 id=&quot;step-4-choose-a-template&quot;&gt;Step 4: Choose a Template&lt;/h4&gt;
&lt;p&gt;Oracle provides three templates to streamline setup:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Production&lt;/strong&gt;: Creates a high availability DB system with recommended settings for production environments&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Development or Testing&lt;/strong&gt;: Creates a standalone DB system optimized for dev/test workloads&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Always Free&lt;/strong&gt;: Creates a standalone system with limited resources (50GB storage, MySQL.Free shape) suitable for learning and small projects&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;step-5-configure-basic-information&quot;&gt;Step 5: Configure Basic Information&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Compartment Selection&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Choose the compartment where you want to create the DB system&lt;/li&gt;
&lt;li&gt;Compartments help organize and manage access to resources&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;System Identification&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Name&lt;/strong&gt;: Provide a display name for your DB system (doesn't need to be unique)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Description&lt;/strong&gt;: (Optional) Add details about the system's purpose&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;OCID&lt;/strong&gt;: Oracle automatically generates a unique identifier&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;step-6-configure-database-credentials&quot;&gt;Step 6: Configure Database Credentials&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Administrator Credentials&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Username&lt;/strong&gt;: Specify the administrator username (avoid reserved usernames)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Password&lt;/strong&gt;: Create a strong password that meets security requirements&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Important&lt;/strong&gt;: Save these credentials securely – you'll need them to connect to the database&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;step-7-configure-networking&quot;&gt;Step 7: Configure Networking&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Virtual Cloud Network (VCN)&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Select an existing VCN or create a new one&lt;/li&gt;
&lt;li&gt;Choose the &lt;strong&gt;private subnet&lt;/strong&gt; for the DB system (recommended for security)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Availability Domain&lt;/strong&gt;: Select the AD where the primary instance will run&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Fault Domain&lt;/strong&gt;: Oracle automatically selects an appropriate fault domain&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Configure Security List&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Ensure your VCN's security list allows MySQL traffic:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Source CIDR&lt;/strong&gt;: 0.0.0.0/0 (or restrict to specific IP ranges)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Destination Ports&lt;/strong&gt;: 3306 (MySQL) and 33060 (MySQL X Protocol)&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;step-8-select-shape&quot;&gt;Step 8: Select Shape&lt;/h4&gt;
&lt;p&gt;Choose a shape that defines your system's compute resources:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;ECPU Shapes&lt;/strong&gt; (Recommended as of 2024): Architecture-agnostic shapes that can be changed after deployment&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;OCPU Shapes&lt;/strong&gt;: Being deprecated for new users (sunset date: March 13, 2026)&lt;/li&gt;
&lt;li&gt;Examples: MySQL.8, MySQL.16, MySQL.32, MySQL.HeatWave.VM.Standard&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The shape determines CPU count, memory, and network bandwidth. You can scale up or down later based on workload demands.&lt;/p&gt;
&lt;h4 id=&quot;step-9-configure-storage&quot;&gt;Step 9: Configure Storage&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Initial Data Storage Size&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Specify storage in GB (minimum: 50 GB, maximum: 131,072 GB)&lt;/li&gt;
&lt;li&gt;Consider your current data size plus growth projections&lt;/li&gt;
&lt;li&gt;Storage can be increased later but not decreased&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Automatic Storage Expansion&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Enable this feature to automatically grow storage when space usage approaches the Health Monitor read-only limits&lt;/li&gt;
&lt;li&gt;Helps prevent storage-related outages&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;step-10-configure-heatwave-cluster-optional-&quot;&gt;Step 10: Configure HeatWave Cluster (Optional)&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Enable HeatWave Cluster&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Select this option to add analytics capabilities&lt;/li&gt;
&lt;li&gt;Configure the number of HeatWave nodes (minimum: 1, maximum: depends on shape and region)&lt;/li&gt;
&lt;li&gt;Choose the HeatWave node shape&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;MySQL HeatWave Lakehouse&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Enable to query data in Object Storage (CSV, Parquet, Aurora/Redshift backups)&lt;/li&gt;
&lt;li&gt;Note: Prior to MySQL 8.3.0-u2, enabling Lakehouse required disabling HA, point-in-time recovery, and read replicas&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;step-11-configure-backup-plan&quot;&gt;Step 11: Configure Backup Plan&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Backup Settings&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Enable automatic backups&lt;/strong&gt;: Recommended for production&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Backup retention period&lt;/strong&gt;: Choose from 1 to 35 days&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Point-in-time recovery&lt;/strong&gt;: Enables restoration to any point within the retention window&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Backup window&lt;/strong&gt;: Select a time when database activity is lowest&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;step-12-advanced-options-optional-&quot;&gt;Step 12: Advanced Options (Optional)&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Configuration&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Apply a custom configuration or use the default&lt;/li&gt;
&lt;li&gt;High availability requires an HA-compatible configuration (configurations with &quot;HA&quot; suffix)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Hostname Label&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Define a DNS hostname for your DB system (requires DNS hostnames enabled in VCN)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Tags&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Add metadata for organization and cost tracking&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;step-13-create-the-db-system&quot;&gt;Step 13: Create the DB System&lt;/h4&gt;
&lt;p&gt;Review all settings and click &lt;strong&gt;Create&lt;/strong&gt;. The DB system enters the &lt;strong&gt;CREATING&lt;/strong&gt; state and typically becomes available in 15-30 minutes.&lt;/p&gt;
&lt;h3 id=&quot;understanding-high-availability-in-mysql-heatwave&quot;&gt;Understanding High Availability in MySQL HeatWave&lt;/h3&gt;
&lt;p&gt;High availability is a critical feature for production workloads that require maximum uptime and fault tolerance.&lt;/p&gt;
&lt;h4 id=&quot;what-is-high-availability-&quot;&gt;What is High Availability?&lt;/h4&gt;
&lt;p&gt;A high availability DB system consists of three MySQL instances: a primary instance and two secondary instances, with the primary functioning as a read/write endpoint and secondary instances receiving asynchronous data replication from the primary.&lt;/p&gt;
&lt;h4 id=&quot;key-benefits&quot;&gt;Key Benefits&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Business Continuity&lt;/strong&gt;: Three MySQL instances distributed across different availability or fault domains&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Minimal Downtime&lt;/strong&gt;: Automatic failover promotes a secondary instance to primary when the primary fails, resuming availability with no data loss&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Flexible Placement&lt;/strong&gt;: Choose your preferred availability domain and fault domain for the primary instance&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Uptime SLA&lt;/strong&gt;: Supports 99.99% availability requirements&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;HeatWave Compatible&lt;/strong&gt;: You can enable HeatWave cluster on high availability DB systems&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&quot;architecture-components&quot;&gt;Architecture Components&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Primary Instance&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Handles all write operations and read queries&lt;/li&gt;
&lt;li&gt;Located in your chosen availability domain&lt;/li&gt;
&lt;li&gt;Provides the read/write endpoint with a consistent IP address&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Secondary Instances (2)&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Receive replicated data from the primary asynchronously&lt;/li&gt;
&lt;li&gt;Placed in different availability or fault domains from the primary&lt;/li&gt;
&lt;li&gt;Ready to be promoted to primary during failover&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Placement Models&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;There are two deployment models:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Multiple Availability Domains with Regional Subnet&lt;/strong&gt;: Three instances spread across three different ADs (AD1, AD2, AD3)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Single Availability Domain with Multiple Fault Domains&lt;/strong&gt;: All three instances in one AD but different fault domains&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&quot;replication-mechanism&quot;&gt;Replication Mechanism&lt;/h4&gt;
&lt;p&gt;MySQL HeatWave uses MySQL Group Replication for high availability, with primary keys required as a prerequisite for the group replication used by high availability. Data is copied from the primary to secondary instances over a secure, managed internal network.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Important&lt;/strong&gt;: The binary logs of each MySQL instance are managed independently, meaning even though instances have the same data, they can have different binary log files with different names and sizes.&lt;/p&gt;
&lt;h3 id=&quot;prerequisites-for-enabling-high-availability&quot;&gt;Prerequisites for Enabling High Availability&lt;/h3&gt;
&lt;p&gt;Before enabling high availability on a DB system, ensure the following requirements are met:&lt;/p&gt;
&lt;h4 id=&quot;1-mysql-version-requirement&quot;&gt;1. MySQL Version Requirement&lt;/h4&gt;
&lt;p&gt;MySQL version must be 8.0.24 or higher to enable high availability. If using an older version, upgrade before enabling HA.&lt;/p&gt;
&lt;h4 id=&quot;2-primary-keys-on-all-tables&quot;&gt;2. Primary Keys on All Tables&lt;/h4&gt;
&lt;p&gt;If you are migrating data to MySQL HeatWave and have not defined primary keys on your tables, you must add them.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Why Primary Keys Matter&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Required for MySQL Group Replication&lt;/li&gt;
&lt;li&gt;Ensure data consistency across instances&lt;/li&gt;
&lt;li&gt;Impact load performance if composite or non-INTEGER&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;How to Check and Add Primary Keys&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Use MySQL Shell to identify tables without primary keys:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;SELECT DISTINCT
    table_schema,
    table_name
FROM information_schema.columns
WHERE table_schema NOT IN ('information_schema', 'mysql', 'performance_schema', 'sys')
AND table_name NOT IN (
    SELECT table_name
    FROM information_schema.table_constraints
    WHERE constraint_type = 'PRIMARY KEY'
);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Adding Primary Keys Using Invisible Columns&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Using invisible columns to add primary keys is a low-impact way to update existing data for use with a high availability DB system:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;ALTER TABLE your_table 
ADD COLUMN id BIGINT UNSIGNED AUTO_INCREMENT PRIMARY KEY INVISIBLE;
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;3-crash-recovery-enabled&quot;&gt;3. Crash Recovery Enabled&lt;/h4&gt;
&lt;p&gt;Verify crash recovery is enabled on your DB system. This is typically enabled by default but can be checked in the configuration settings.&lt;/p&gt;
&lt;h4 id=&quot;4-inbound-replication-stopped&quot;&gt;4. Inbound Replication Stopped&lt;/h4&gt;
&lt;p&gt;If you intend to configure an inbound replication channel on this DB system, you must import data before enabling high availability and configure your channel after high availability is enabled.&lt;/p&gt;
&lt;h4 id=&quot;5-compatible-configuration&quot;&gt;5. Compatible Configuration&lt;/h4&gt;
&lt;p&gt;All default configurations that are compatible with high availability have the HA suffix in the configuration name. If using a custom configuration, copy it from an existing HA-compatible configuration.&lt;/p&gt;
&lt;h4 id=&quot;6-heatwave-cluster-considerations&quot;&gt;6. HeatWave Cluster Considerations&lt;/h4&gt;
&lt;p&gt;If a HeatWave cluster load or reload operation is ongoing, enabling or disabling high availability can fail. Wait for these operations to complete before making HA changes.&lt;/p&gt;
&lt;h3 id=&quot;enabling-high-availability-on-an-existing-db-system&quot;&gt;Enabling High Availability on an Existing DB System&lt;/h3&gt;
&lt;h4 id=&quot;using-the-console&quot;&gt;Using the Console&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;Navigate to your DB System details page&lt;/li&gt;
&lt;li&gt;From the &lt;strong&gt;Actions&lt;/strong&gt; menu, select &lt;strong&gt;Enable high availability&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Review the prerequisites dialog&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Enable high availability&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The process creates two secondary instances by cloning from the primary instance and does not cause any downtime.&lt;/p&gt;
&lt;h4 id=&quot;using-oci-cli-1&quot;&gt;Using OCI CLI&lt;/h4&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;oci mysql db-system update \
  --db-system-id &amp;lt;DB_SYSTEM_OCID&amp;gt; \
  --is-highly-available true
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: If the configuration is not compatible with high availability, you must first change the DB system to use a high availability compatible configuration before enabling it.&lt;/p&gt;
&lt;h3 id=&quot;understanding-failover-and-switchover&quot;&gt;Understanding Failover and Switchover&lt;/h3&gt;
&lt;h4 id=&quot;automatic-failover&quot;&gt;Automatic Failover&lt;/h4&gt;
&lt;p&gt;When the primary instance becomes unavailable due to hardware failure, network issues, or other problems, MySQL HeatWave Service automatically initiates a failover.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Failover Process&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Service detects primary instance failure&lt;/li&gt;
&lt;li&gt;One secondary instance is automatically promoted to primary&lt;/li&gt;
&lt;li&gt;The IP address of the read/write endpoint does not change, regardless of the placement of the primary instance&lt;/li&gt;
&lt;li&gt;Applications must reconnect, but the endpoint remains the same&lt;/li&gt;
&lt;li&gt;No data loss occurs&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For a high availability DB system with HeatWave cluster, if the primary instance fails, HeatWave Service deletes the HeatWave cluster attached to the failed instance and adds a new one to the new primary instance, with tables automatically loaded.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Post-Failover State&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;current placement&lt;/strong&gt; changes to the new primary's location&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;preferred placement&lt;/strong&gt; (your original choice) remains unchanged&lt;/li&gt;
&lt;li&gt;A message appears: &quot;Current placement differs from preferred placement, due to failover&quot;&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;manual-switchover&quot;&gt;Manual Switchover&lt;/h4&gt;
&lt;p&gt;You can manually select one of the MySQL instances as the primary instance through switchover, which changes both the preferred placement and current placement to the newly selected placement.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;When to Use Switchover&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Planned maintenance on the current primary's availability domain&lt;/li&gt;
&lt;li&gt;Testing disaster recovery procedures&lt;/li&gt;
&lt;li&gt;Rebalancing after a failover to restore preferred placement&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Switchover Process&lt;/strong&gt; (for systems created/upgraded after February 25, 2025):&lt;/p&gt;
&lt;p&gt;New transactions are blocked when switchover is initiated, running transactions are allowed to complete, and the switchover process waits until all running transactions finish and commit.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Navigate to DB System details page&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Switchover&lt;/strong&gt; from the Actions menu&lt;/li&gt;
&lt;li&gt;Select the target availability domain or fault domain&lt;/li&gt;
&lt;li&gt;Confirm the switchover&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;When the current placement changes in a switchover, it results in a short period of downtime while the primary instance is redirected to the newly promoted instance, and all database connections must be reopened.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Using CLI&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;oci mysql db-system update \
  --db-system-id &amp;lt;DB_SYSTEM_OCID&amp;gt; \
  --availability-domain &amp;lt;TARGET_AD&amp;gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Important Notes&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Uncommitted transactions are rolled back when the connection to the previous primary instance is broken&lt;/li&gt;
&lt;li&gt;Long-running queries offloaded to HeatWave cluster may be aborted&lt;/li&gt;
&lt;li&gt;After a switchover, the current binary log file name and position of the new primary may be different from the old primary&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;heatwave-cluster-with-high-availability&quot;&gt;HeatWave Cluster with High Availability&lt;/h3&gt;
&lt;p&gt;You can enable HeatWave cluster on a high availability DB system for combined OLTP and analytics capabilities.&lt;/p&gt;
&lt;h4 id=&quot;heatwave-behavior-during-placement-changes&quot;&gt;HeatWave Behavior During Placement Changes&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Same Availability Domain&lt;/strong&gt;:&lt;br&gt;
If both the previous primary instance and the new primary instance are located in the same availability domain, the existing HeatWave cluster can be reused by detaching from the previous primary and reattaching to the new primary.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Different Availability Domains&lt;/strong&gt;:&lt;br&gt;
If the previous primary and new primary are in different availability domains, the existing HeatWave cluster must be detached and deleted, with a new HeatWave cluster created in the same AD as the new primary instance.&lt;/p&gt;
&lt;h4 id=&quot;data-recovery&quot;&gt;Data Recovery&lt;/h4&gt;
&lt;p&gt;The data in the HeatWave cluster is automatically recovered from:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The HeatWave Storage Layer (fastest option)&lt;/li&gt;
&lt;li&gt;Reloaded from the DB system&lt;/li&gt;
&lt;li&gt;Reloaded from Lakehouse Object Storage&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;This ensures minimal disruption to analytics workloads even during failover scenarios.&lt;/p&gt;
&lt;h3 id=&quot;disabling-high-availability&quot;&gt;Disabling High Availability&lt;/h3&gt;
&lt;p&gt;If you need to convert a high availability DB system back to standalone:&lt;/p&gt;
&lt;p&gt;Disabling high availability creates a standalone DB system from the instance running in the preferred primary placement, with no downtime if the primary is already in the preferred placement, but a controlled failover and short downtime if it is not.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Console Method&lt;/strong&gt;:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Navigate to DB System details&lt;/li&gt;
&lt;li&gt;Actions menu → &lt;strong&gt;Disable high availability&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;Confirm the action&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;strong&gt;CLI Method&lt;/strong&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;oci mysql db-system update \
  --db-system-id &amp;lt;DB_SYSTEM_OCID&amp;gt; \
  --is-highly-available false
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Tip&lt;/strong&gt;: You can avoid downtime by switching the preferred primary placement to the current primary instance before disabling high availability.&lt;/p&gt;
&lt;h3 id=&quot;monitoring-and-observability&quot;&gt;Monitoring and Observability&lt;/h3&gt;
&lt;h4 id=&quot;health-monitoring&quot;&gt;Health Monitoring&lt;/h4&gt;
&lt;p&gt;MySQL HeatWave provides built-in monitoring:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Instance health status&lt;/li&gt;
&lt;li&gt;Storage utilization&lt;/li&gt;
&lt;li&gt;Connection metrics&lt;/li&gt;
&lt;li&gt;Replication lag (for HA systems)&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;event-notifications&quot;&gt;Event Notifications&lt;/h4&gt;
&lt;p&gt;When a failover happens, a MySQL - Automatic Recovery event is emitted on the DB system with the additionalDetails.isFailover property set to true.&lt;/p&gt;
&lt;p&gt;Configure operational notifications to receive alerts for:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Failover events&lt;/li&gt;
&lt;li&gt;Storage threshold warnings&lt;/li&gt;
&lt;li&gt;Backup completion/failure&lt;/li&gt;
&lt;li&gt;Maintenance notifications&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;integration-with-monitoring-services&quot;&gt;Integration with Monitoring Services&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;OCI Monitoring&lt;/strong&gt;: Native integration with OCI Monitoring service&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AWS CloudWatch&lt;/strong&gt;: Available for MySQL HeatWave on AWS&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Custom Metrics&lt;/strong&gt;: Export metrics to third-party monitoring tools&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;best-practices-5&quot;&gt;Best Practices&lt;/h3&gt;
&lt;h4 id=&quot;planning-for-high-availability&quot;&gt;Planning for High Availability&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Always Use HA for Production&lt;/strong&gt;: Any workload requiring uptime guarantees should use high availability&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Test Failover Procedures&lt;/strong&gt;: Regularly perform switchovers to verify your disaster recovery processes&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monitor Replication Lag&lt;/strong&gt;: Though minimal, monitor lag between primary and secondary instances&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Configure Application Retry Logic&lt;/strong&gt;: Ensure applications can reconnect automatically after failover&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&quot;storage-planning&quot;&gt;Storage Planning&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Oversize Storage Initially&lt;/strong&gt;: Leave room for growth to avoid frequent expansions&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Enable Automatic Expansion&lt;/strong&gt;: Prevents storage-related outages&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monitor Storage Trends&lt;/strong&gt;: Track usage patterns to predict future needs&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&quot;security-considerations&quot;&gt;Security Considerations&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Use Private Subnets&lt;/strong&gt;: Keep DB systems in private subnets&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Restrict Security Lists&lt;/strong&gt;: Limit access to known IP ranges&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Secure Credentials&lt;/strong&gt;: Use OCI Vault for secrets management&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Regular Patches&lt;/strong&gt;: Enable automatic security updates&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&quot;cost-optimization&quot;&gt;Cost Optimization&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Right-Size Shapes&lt;/strong&gt;: Start with appropriate shapes and adjust based on metrics&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Optimize Backup Retention&lt;/strong&gt;: Balance compliance needs with storage costs&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Use Development Templates&lt;/strong&gt;: For non-production workloads, use lower-cost configurations&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monitor Resource Utilization&lt;/strong&gt;: Use Autopilot Shape Advisor for recommendations&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;conclusion-2&quot;&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;MySQL HeatWave provides a comprehensive, fully managed database service with enterprise-grade high availability features. By following this guide, you can create robust DB systems that meet demanding uptime requirements while benefiting from automatic failover, integrated analytics, and seamless scalability.&lt;/p&gt;
&lt;p&gt;The combination of automated management, built-in high availability, and HeatWave analytics capabilities makes MySQL HeatWave an excellent choice for modern applications requiring both transactional processing and real-time analytics without the complexity of managing multiple database systems.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;For the latest information, consult the &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.oracle.com/en-us/iaas/mysql-database/&quot;&gt;official MySQL HeatWave documentation&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
</description>
<category>mysql</category>
<guid isPermaLink="true">https://coderlegion.com/7029/mysql-heatwave-creating-db-systems-and-high-availability-setup</guid>
<pubDate>Tue, 04 Nov 2025 11:52:49 +0000</pubDate>
</item>
<item>
<title>MySQL HeatWave Architecture: A Complete Guide</title>
<link>https://coderlegion.com/6993/mysql-heatwave-architecture-a-complete-guide</link>
<description>&lt;h3 id=&quot;introduction-3&quot;&gt;Introduction&lt;/h3&gt;
&lt;p&gt;MySQL HeatWave is Oracle's fully managed database service that uniquely combines Online Transaction Processing (OLTP) and Online Analytical Processing (OLAP) workloads in a single platform. Built on MySQL Enterprise Edition, it delivers real-time analytics on transactional data without requiring ETL duplication to a separate analytics database.&lt;/p&gt;
&lt;h3 id=&quot;db-system-architecture-overview&quot;&gt;DB System Architecture Overview&lt;/h3&gt;
&lt;p&gt;A MySQL HeatWave DB System consists of several key components:&lt;/p&gt;
&lt;h4 id=&quot;core-components&quot;&gt;Core Components&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Compute Instance&lt;/strong&gt;: The foundational cloud-based compute resource&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;MySQL Server&lt;/strong&gt;: MySQL Enterprise Edition with advanced security features including encryption, data masking, authentication, and a database firewall&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Operating System&lt;/strong&gt;: Oracle Linux OS&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Virtual Network Interface Card (VNIC)&lt;/strong&gt;: Enables network connectivity&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Block Storage&lt;/strong&gt;: Persistent storage for data and transaction logs&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;prerequisites-for-deployment&quot;&gt;Prerequisites for Deployment&lt;/h4&gt;
&lt;p&gt;Before creating a DB System, you need:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Tenancy&lt;/strong&gt;: Your Oracle Cloud Infrastructure account&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Compartment&lt;/strong&gt;: Logical container for organizing resources&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Policies&lt;/strong&gt;: IAM policies for access control&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Virtual Cloud Network (VCN)&lt;/strong&gt;: Network infrastructure for connectivity&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;db-system-provisioning&quot;&gt;DB System Provisioning&lt;/h3&gt;
&lt;h4 id=&quot;shape-configuration&quot;&gt;Shape Configuration&lt;/h4&gt;
&lt;p&gt;Shapes specify CPU, memory, and network bandwidth. As of 2024, you can provision MySQL HeatWave DB systems using ECPU shapes, which are architecture-agnostic. Shapes can be changed after deployment to scale your resources up or down based on workload demands.&lt;/p&gt;
&lt;h4 id=&quot;storage-capacity&quot;&gt;Storage Capacity&lt;/h4&gt;
&lt;p&gt;Storage stores both data and logs and can be increased as your database grows. The system automatically manages storage allocation for optimal performance.&lt;/p&gt;
&lt;h4 id=&quot;endpoint-configuration&quot;&gt;Endpoint Configuration&lt;/h4&gt;
&lt;p&gt;The endpoint comprises private IP addresses and port numbers that accept client connections. This provides secure, private connectivity to your database instance.&lt;/p&gt;
&lt;h3 id=&quot;data-security-in-heatwave&quot;&gt;Data Security in HeatWave&lt;/h3&gt;
&lt;p&gt;MySQL HeatWave implements comprehensive security measures: data is encrypted and compressed both at rest and in transit. Client applications connect securely to the HeatWave DB System through encrypted channels.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Data Masking&lt;/strong&gt; is commonly implemented for protecting sensitive information such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Social Security Numbers (SSNs)&lt;/li&gt;
&lt;li&gt;Credit card numbers&lt;/li&gt;
&lt;li&gt;Phone numbers&lt;/li&gt;
&lt;li&gt;Personally Identifiable Information (PII)&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;high-availability-architecture&quot;&gt;High Availability Architecture&lt;/h3&gt;
&lt;h4 id=&quot;standalone-vs-high-availability-db-systems&quot;&gt;Standalone vs. High Availability DB Systems&lt;/h4&gt;
&lt;p&gt;A &lt;strong&gt;High Availability (HA) DB System&lt;/strong&gt; provides enterprise-grade reliability through:&lt;/p&gt;
&lt;p&gt;Three MySQL instances: one primary instance and two secondary instances, with all data written to the primary instance automatically copied to the secondary instances.&lt;/p&gt;
&lt;h4 id=&quot;distribution-across-availability-domains&quot;&gt;Distribution Across Availability Domains&lt;/h4&gt;
&lt;p&gt;The three instances are deployed across different availability domains (AD1, AD2, AD3) and fault domains. This geographic distribution ensures resilience against localized failures.&lt;/p&gt;
&lt;h4 id=&quot;automatic-failover-mechanism&quot;&gt;Automatic Failover Mechanism&lt;/h4&gt;
&lt;p&gt;In case the primary instance fails, MySQL HeatWave Service automatically promotes one of the secondary instances to function as the primary instance, resuming availability with no data loss.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Important Note&lt;/strong&gt;: MySQL HeatWave uses MySQL Group Replication to replicate data from the primary to secondary instances over a secure, managed internal network.&lt;/p&gt;
&lt;h3 id=&quot;heatwave-cluster-architecture&quot;&gt;HeatWave Cluster Architecture&lt;/h3&gt;
&lt;h4 id=&quot;components-and-features&quot;&gt;Components and Features&lt;/h4&gt;
&lt;p&gt;The HeatWave cluster extends your DB System with powerful analytics capabilities:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;HeatWave Plugin&lt;/strong&gt;: Manages cluster operations and query routing&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;HeatWave Nodes&lt;/strong&gt;: Store data in memory and process analytics queries, with each node containing an instance of HeatWave&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Data Loading&lt;/strong&gt;: Tables are loaded from MySQL into the HeatWave cluster&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Query Offloading&lt;/strong&gt;: Analytics queries are automatically offloaded to the cluster&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;scalability&quot;&gt;Scalability&lt;/h4&gt;
&lt;p&gt;HeatWave's scale-out architecture enables massive parallelism, allowing the cluster to scale up to 512 nodes for provisioning, loading data, and processing queries.&lt;/p&gt;
&lt;h4 id=&quot;query-processing&quot;&gt;Query Processing&lt;/h4&gt;
&lt;p&gt;MySQL HeatWave Cluster stores data in main memory using a hybrid columnar format that achieves the benefits of columnar processing while avoiding the materialization and update costs of pure columnar format.&lt;/p&gt;
&lt;p&gt;Queries that meet specific prerequisites are automatically offloaded from the MySQL DB System to the HeatWave cluster for accelerated processing, with results returned to the client through the MySQL DB System.&lt;/p&gt;
&lt;h3 id=&quot;heatwave-storage-layer&quot;&gt;HeatWave Storage Layer&lt;/h3&gt;
&lt;p&gt;The HeatWave Storage Layer is a critical component that provides data persistence and rapid recovery:&lt;/p&gt;
&lt;h4 id=&quot;key-features&quot;&gt;Key Features&lt;/h4&gt;
&lt;p&gt;Data loaded into MySQL HeatWave Cluster is automatically persisted to network-attached block storage, known as the MySQL HeatWave Storage Layer, which allows data to be reloaded quickly when the cluster resumes after a pause or recovers from a node or cluster failure.&lt;/p&gt;
&lt;h4 id=&quot;storage-layer-capabilities&quot;&gt;Storage Layer Capabilities&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Automated Persistence&lt;/strong&gt;: Stores a copy of in-memory data automatically&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Transparent Updates&lt;/strong&gt;: Changes are propagated without manual intervention&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Fast Recovery&lt;/strong&gt;: Enables rapid restoration after failures&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Data Reload&lt;/strong&gt;: Supports efficient data restoration to memory&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Automatic Expansion&lt;/strong&gt;: On AWS, the storage layer is built on S3, allowing data to be reloaded to each MySQL HeatWave node independently and in parallel&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&quot;self-managing-architecture&quot;&gt;Self-Managing Architecture&lt;/h4&gt;
&lt;p&gt;This automated, self-managing storage layer scales to the size required for your MySQL HeatWave Cluster and operates independently in the background.&lt;/p&gt;
&lt;h3 id=&quot;heatwave-lakehouse&quot;&gt;HeatWave Lakehouse&lt;/h3&gt;
&lt;p&gt;MySQL HeatWave Lakehouse allows enterprises to process and query data across file formats such as CSV and Parquet, as well as Aurora and Redshift backups from AWS, even when data is not stored inside a MySQL database.&lt;/p&gt;
&lt;p&gt;The Lakehouse capability enables organizations to:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Query up to 400TB of data in object storage&lt;/li&gt;
&lt;li&gt;Combine OLTP data with data lake information&lt;/li&gt;
&lt;li&gt;Eliminate ETL complexity and costs&lt;/li&gt;
&lt;li&gt;Process structured, semi-structured, and unstructured data&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;performance-and-capabilities&quot;&gt;Performance and Capabilities&lt;/h3&gt;
&lt;h4 id=&quot;automl-integration&quot;&gt;AutoML Integration&lt;/h4&gt;
&lt;p&gt;MySQL HeatWave includes built-in machine learning capabilities through HeatWave AutoML, which:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Automates model training and selection&lt;/li&gt;
&lt;li&gt;Eliminates the need for separate ML services&lt;/li&gt;
&lt;li&gt;Processes data in-database for security and performance&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;genai-and-vector-store&quot;&gt;GenAI and Vector Store&lt;/h4&gt;
&lt;p&gt;Recent additions include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In-database Large Language Models (LLMs)&lt;/li&gt;
&lt;li&gt;Automated vector store for AI applications&lt;/li&gt;
&lt;li&gt;Natural language query capabilities&lt;/li&gt;
&lt;li&gt;Contextual conversations with your data&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;performance-benchmarks&quot;&gt;Performance Benchmarks&lt;/h4&gt;
&lt;p&gt;Oracle claims HeatWave provides 1,400x faster analytics performance than Amazon RDS Aurora and 6-7x faster than AWS Redshift and Snowflake, based on their benchmarks.&lt;/p&gt;
&lt;h3 id=&quot;multicloud-availability&quot;&gt;Multicloud Availability&lt;/h3&gt;
&lt;p&gt;MySQL HeatWave is available across multiple cloud platforms:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Oracle Cloud Infrastructure (OCI)&lt;/strong&gt;: Native availability in all OCI regions&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Amazon Web Services (AWS)&lt;/strong&gt;: Native deployment within AWS&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Microsoft Azure&lt;/strong&gt;: Available through Oracle Database Service for Azure&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;best-practices-6&quot;&gt;Best Practices&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Enable High Availability&lt;/strong&gt;: For production workloads requiring 99.99% uptime&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Monitor Shape Performance&lt;/strong&gt;: Use Autopilot Shape Advisor for optimization&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Implement Data Masking&lt;/strong&gt;: Protect sensitive information at the column level&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Leverage Storage Layer&lt;/strong&gt;: Trust automatic persistence for recovery scenarios&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Plan Node Capacity&lt;/strong&gt;: Use the Estimate Node Count feature for proper cluster sizing&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&quot;conclusion-3&quot;&gt;Conclusion&lt;/h3&gt;
&lt;p&gt;MySQL HeatWave represents a significant advancement in database technology by unifying OLTP and OLAP workloads in a single, fully managed service. Its innovative architecture, featuring automated storage management, high availability, and integrated machine learning capabilities, makes it a compelling choice for organizations seeking to eliminate data duplication, reduce costs, and accelerate insights from their data.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;For more detailed information, consult the &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.oracle.com/en-us/iaas/mysql-database/&quot;&gt;official MySQL HeatWave documentation&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://coderlegion.com/6993/mysql-heatwave-architecture-a-complete-guide</guid>
<pubDate>Sun, 02 Nov 2025 09:22:57 +0000</pubDate>
</item>
<item>
<title>MySQL HeatWave: The Fully Managed Multi-Cloud Database with Integrated AI</title>
<link>https://coderlegion.com/6966/mysql-heatwave-the-fully-managed-multi-cloud-database-with-integrated-ai</link>
<description>&lt;p&gt;MySQL HeatWave represents a revolutionary approach to database management, combining transaction processing, real-time analytics, machine learning, and generative AI in a single, fully managed service. Developed and supported by the MySQL team at Oracle, HeatWave transforms how organizations build modern data applications across multiple cloud platforms.&lt;/p&gt;
&lt;h3 id=&quot;what-is-mysql-heatwave-&quot;&gt;&lt;strong&gt;What is MySQL HeatWave?&lt;/strong&gt;&lt;/h3&gt;
&lt;h4 id=&quot;unified-database-platform&quot;&gt;&lt;strong&gt;Unified Database Platform&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;MySQL HeatWave is a fully managed database service that runs MySQL, providing a single platform that eliminates the complexity of managing separate systems for different workloads.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Integrated Capabilities:&lt;/strong&gt;&lt;br&gt;
MySQL HeatWave is the only MySQL database service to combine Online Transaction Processing (OLTP), Online Analytical Processing (OLAP), Machine Learning (ML), and Generative AI workloads within a single MySQL Database—without requiring ETL duplication or separate analytics databases.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Development and Support:&lt;/strong&gt;&lt;br&gt;
Developed and supported by the MySQL team at Oracle, ensuring deep MySQL expertise, community alignment, and continuous innovation.&lt;/p&gt;
&lt;h4 id=&quot;multi-cloud-availability&quot;&gt;&lt;strong&gt;Multi-Cloud Availability&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Supported Cloud Platforms:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Oracle Cloud Infrastructure (OCI):&lt;/strong&gt; Native deployment with full feature set&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Amazon Web Services (AWS):&lt;/strong&gt; Complete HeatWave capabilities on AWS&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Microsoft Azure:&lt;/strong&gt; Integrated with Azure cloud services&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Multi-Cloud Benefits:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Deploy where your applications and data reside&lt;/li&gt;
&lt;li&gt;Avoid cloud vendor lock-in&lt;/li&gt;
&lt;li&gt;Consistent experience across cloud providers&lt;/li&gt;
&lt;li&gt;Flexible hybrid and multi-cloud architectures&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;key-advantages-over-on-premises-mysql&quot;&gt;&lt;strong&gt;Key Advantages Over On-Premises MySQL&lt;/strong&gt;&lt;/h3&gt;
&lt;h4 id=&quot;rapid-provisioning-and-deployment&quot;&gt;&lt;strong&gt;Rapid Provisioning and Deployment&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Infrastructure Automation:&lt;/strong&gt;&lt;br&gt;
Rapid provisioning of database systems and all underlying infrastructure eliminates weeks of manual setup and configuration.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Deployment Speed:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Database instances available in minutes&lt;/li&gt;
&lt;li&gt;Automatic compute, storage, and network configuration&lt;/li&gt;
&lt;li&gt;Pre-configured high availability and security&lt;/li&gt;
&lt;li&gt;Instant scaling without downtime&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;automated-management-operations&quot;&gt;&lt;strong&gt;Automated Management Operations&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Comprehensive Automation:&lt;/strong&gt;&lt;br&gt;
Automated tasks including patching, upgrading, and backups free database administrators from routine maintenance.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Managed Operations:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Automatic security patches and updates&lt;/li&gt;
&lt;li&gt;Zero-downtime upgrades to new versions&lt;/li&gt;
&lt;li&gt;Continuous automated backups&lt;/li&gt;
&lt;li&gt;Disaster recovery configuration&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;advanced-data-protection&quot;&gt;&lt;strong&gt;Advanced Data Protection&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Security Features:&lt;/strong&gt;&lt;br&gt;
Comprehensive data protection including encryption, firewall, and data masking ensures enterprise-grade security.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Protection Layers:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Encryption:&lt;/strong&gt; TLS/SSL for data in transit, encryption at rest&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Firewall:&lt;/strong&gt; Network-level access controls&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Data Masking:&lt;/strong&gt; Sensitive data protection for non-production environments&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Audit Logging:&lt;/strong&gt; Comprehensive activity tracking&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;always-current-features&quot;&gt;&lt;strong&gt;Always Current Features&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Latest Enterprise Features:&lt;/strong&gt;&lt;br&gt;
Always up-to-date with the latest enterprise features and security enhancements without manual intervention.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Continuous Innovation:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Quarterly feature releases&lt;/li&gt;
&lt;li&gt;Security updates applied automatically&lt;/li&gt;
&lt;li&gt;Performance improvements continuously deployed&lt;/li&gt;
&lt;li&gt;New AI and ML capabilities added regularly&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;shared-responsibility-model&quot;&gt;&lt;strong&gt;Shared Responsibility Model&lt;/strong&gt;&lt;/h3&gt;
&lt;h4 id=&quot;customer-responsibilities&quot;&gt;&lt;strong&gt;Customer Responsibilities&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Application-Level Management:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. Deployment Initiation:&lt;/strong&gt;&lt;br&gt;
Customers initiate the deployment of MySQL database systems through the cloud console or APIs.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. User Account Management:&lt;/strong&gt;&lt;br&gt;
Create and manage database user accounts, roles, and privileges according to application requirements.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3. Database Object Creation:&lt;/strong&gt;&lt;br&gt;
Design and create database objects including schemas, tables, indexes, views, and stored procedures.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;4. Data Management:&lt;/strong&gt;&lt;br&gt;
Load initial data, manage ongoing data operations, and maintain data quality and integrity.&lt;/p&gt;
&lt;h4 id=&quot;oracle-responsibilities&quot;&gt;&lt;strong&gt;Oracle Responsibilities&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Infrastructure and Platform Management:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;1. Infrastructure Provisioning:&lt;/strong&gt;&lt;br&gt;
Oracle handles provisioning of MySQL database systems and all underlying resources including compute, storage, and networking.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. Patching and Updates:&lt;/strong&gt;&lt;br&gt;
Oracle patches the database software and operating system automatically with zero downtime.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;3. Automated Backups:&lt;/strong&gt;&lt;br&gt;
Oracle performs automatic backups according to configured retention policies.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;4. Disaster Recovery:&lt;/strong&gt;&lt;br&gt;
Oracle restores database systems from backups when needed and maintains high availability infrastructure.&lt;/p&gt;
&lt;h3 id=&quot;extreme-performance&quot;&gt;&lt;strong&gt;Extreme Performance&lt;/strong&gt;&lt;/h3&gt;
&lt;h4 id=&quot;100x-faster-than-standard-mysql&quot;&gt;&lt;strong&gt;100x Faster Than Standard MySQL&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Query Acceleration:&lt;/strong&gt;&lt;br&gt;
MySQL HeatWave is extremely performant, delivering 100 times faster performance than standard MySQL database systems without HeatWave for analytical queries.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Performance Architecture:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In-memory columnar processing&lt;/li&gt;
&lt;li&gt;Massively parallel execution&lt;/li&gt;
&lt;li&gt;Intelligent query optimization&lt;/li&gt;
&lt;li&gt;Hardware acceleration&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Benchmark Results:&lt;/strong&gt;&lt;br&gt;
Independent benchmarks demonstrate HeatWave's superior performance compared to cloud data warehouse alternatives including Snowflake, Databricks, and Google BigQuery.&lt;/p&gt;
&lt;h4 id=&quot;application-compatibility&quot;&gt;&lt;strong&gt;Application Compatibility&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Zero Changes Required:&lt;/strong&gt;&lt;br&gt;
All existing MySQL applications work without any changes, ensuring seamless migration and adoption.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Compatibility Features:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Standard MySQL wire protocol&lt;/li&gt;
&lt;li&gt;MySQL SQL dialect support&lt;/li&gt;
&lt;li&gt;Existing driver compatibility&lt;/li&gt;
&lt;li&gt;Familiar tools and interfaces&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;heatwave-components-and-capabilities&quot;&gt;&lt;strong&gt;HeatWave Components and Capabilities&lt;/strong&gt;&lt;/h3&gt;
&lt;h4 id=&quot;heatwave-mysql-transaction-processing&quot;&gt;&lt;strong&gt;HeatWave MySQL: Transaction Processing&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Enterprise-Grade OLTP:&lt;/strong&gt;&lt;br&gt;
HeatWave MySQL enables OLTP workloads to leverage Enterprise Edition features of MySQL Database and delivers unique capabilities such as Auto Shape Prediction, Auto Thread Pooling, Autopilot Indexing, and in-database JavaScript.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;OLTP Enhancements:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Auto Shape Prediction:&lt;/strong&gt; Intelligent right-sizing recommendations&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Auto Thread Pooling:&lt;/strong&gt; Optimized connection management&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Autopilot Indexing:&lt;/strong&gt; Automatic index recommendations&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Native JavaScript:&lt;/strong&gt; Write stored procedures in JavaScript&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Bulk Ingest:&lt;/strong&gt; Load data up to 5X faster&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;New in MySQL HeatWave 9.4:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Hypergraph Optimizer:&lt;/strong&gt; True cost-based join optimization for complex queries&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;OCI Ops Insights Integration:&lt;/strong&gt; ML-based performance analytics and capacity planning&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Enhanced Concurrency:&lt;/strong&gt; Process multiple queries simultaneously across sessions&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;heatwave-lakehouse-object-storage-analytics&quot;&gt;&lt;strong&gt;HeatWave Lakehouse: Object Storage Analytics&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Query Data in Place:&lt;/strong&gt;&lt;br&gt;
HeatWave Lakehouse enables querying structured, semi-structured, and unstructured data directly in object storage without data movement.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Supported Storage:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Amazon S3&lt;/li&gt;
&lt;li&gt;Oracle Object Storage&lt;/li&gt;
&lt;li&gt;Azure Blob Storage&lt;/li&gt;
&lt;li&gt;Amazon Redshift&lt;/li&gt;
&lt;li&gt;Amazon Aurora&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Supported File Formats:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;CSV:&lt;/strong&gt; Comma-separated values&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;JSON:&lt;/strong&gt; JavaScript Object Notation&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;XML:&lt;/strong&gt; Extensible Markup Language&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Avro:&lt;/strong&gt; Row-based binary format&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Parquet:&lt;/strong&gt; Columnar storage format&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;ORC:&lt;/strong&gt; Optimized Row Columnar&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Lakehouse Features:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Query object storage at database speed&lt;/li&gt;
&lt;li&gt;Write results back to object storage&lt;/li&gt;
&lt;li&gt;Automatic change propagation from object storage&lt;/li&gt;
&lt;li&gt;MapReduce application support&lt;/li&gt;
&lt;li&gt;Guided Load for optimized data loading&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;heatwave-genai-integrated-generative-ai&quot;&gt;&lt;strong&gt;HeatWave GenAI: Integrated Generative AI&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;In-Database Large Language Models:&lt;/strong&gt;&lt;br&gt;
MySQL HeatWave GenAI provides integrated, automated, and secure generative AI with in-database large language models (LLMs), an automated vector store, scale-out vector processing, and natural language conversation capabilities.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;GenAI Features:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;In-Database LLMs:&lt;/strong&gt;&lt;br&gt;
Use large language models running directly inside the database without external API calls or data movement.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Supported In-Database Models (as of MySQL 9.4):&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;llama3.2-3b-instruct-v1:&lt;/strong&gt; Default LLM, multilingual support (8 languages)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;llama3.2-1b-instruct-v1:&lt;/strong&gt; Lightweight model, multilingual support&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;llama3.1-8b-instruct-v1:&lt;/strong&gt; Advanced model, multilingual support&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;mistral-7b-instruct-v3:&lt;/strong&gt; Efficient model, multilingual support&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;External LLM Support:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;OCI Generative AI Service:&lt;/strong&gt; Access Cohere and Meta models on OCI&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;OCI Dedicated Clusters:&lt;/strong&gt; Enhanced flexibility and capabilities&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Amazon Bedrock:&lt;/strong&gt; Access foundation models on AWS&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Vision Language Models (VLMs):&lt;/strong&gt; Process vision-language tasks&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;HeatWave Vector Store:&lt;/strong&gt;&lt;br&gt;
MySQL HeatWave Vector Store houses proprietary documents in various formats, acting as the knowledge base for Retrieval-Augmented Generation (RAG) to deliver more accurate and contextually relevant answers.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Vector Store Features:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Automated Embedding Generation:&lt;/strong&gt; No manual vector creation required&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;27 Language Support:&lt;/strong&gt; Multilingual document processing&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;OCR Support:&lt;/strong&gt; Optical character recognition for images and PDFs&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Auto Parallel Load:&lt;/strong&gt; Efficient document ingestion&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Automatic Updates:&lt;/strong&gt; Vector store synchronization with source changes&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Performance Advantages:&lt;/strong&gt;&lt;br&gt;
For similarity search, MySQL HeatWave GenAI is 15X faster than Databricks, 18X faster than Google BigQuery, and 30X faster than Snowflake, while being less expensive.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Natural Language Conversations:&lt;/strong&gt;&lt;br&gt;
Have contextual conversations in natural language with HeatWave Chat, a chatbot that enables multiple follow-up questions about specific topics within a single session.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;NL2ML - Natural Language to Machine Learning:&lt;/strong&gt;&lt;br&gt;
MySQL HeatWave now supports NL2ML, providing an intuitive natural-language interface to machine learning, making ML accessible without coding expertise.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;NL2SQL - Natural Language to SQL:&lt;/strong&gt;&lt;br&gt;
Generate SQL queries from natural-language statements using the ML_NL_SQL routine, making database interactions easier for non-technical users.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Document Summarization:&lt;/strong&gt;&lt;br&gt;
Advanced document summarization capabilities for unstructured documents stored in Object Storage, enabling quick insights from large document collections.&lt;/p&gt;
&lt;h4 id=&quot;heatwave-automl-automated-machine-learning&quot;&gt;&lt;strong&gt;HeatWave AutoML: Automated Machine Learning&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Simplified Machine Learning:&lt;/strong&gt;&lt;br&gt;
HeatWave AutoML enables advanced machine learning capabilities directly within MySQL without data movement, separate ML services, or AI expertise.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;AutoML Capabilities:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Automated Model Building:&lt;/strong&gt; Algorithm selection, feature engineering, hyperparameter tuning&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Model Training:&lt;/strong&gt; In-database training on MySQL data&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Model Deployment:&lt;/strong&gt; Seamless deployment for predictions&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Model Explanation:&lt;/strong&gt; Understand model decisions and feature importance&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Hyperparameter Recording:&lt;/strong&gt; Enhanced transparency and reproducibility&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;New AutoML Features:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Enhanced Data Preparation:&lt;/strong&gt; NL2ML-powered data preparation workflows&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;TRAIN_TEST_SPLIT:&lt;/strong&gt; Automated dataset splitting for training and testing&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Improved Concurrency:&lt;/strong&gt; Process multiple ML queries simultaneously&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Enhanced Performance:&lt;/strong&gt; Faster predictions with ML_PREDICT_TABLE and ML_EXPLAIN_TABLE&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Use Cases:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Predictive maintenance&lt;/li&gt;
&lt;li&gt;Fraud detection&lt;/li&gt;
&lt;li&gt;Personalized recommendations&lt;/li&gt;
&lt;li&gt;Customer churn prediction&lt;/li&gt;
&lt;li&gt;Demand forecasting&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;heatwave-autopilot-intelligent-automation&quot;&gt;&lt;strong&gt;HeatWave Autopilot: Intelligent Automation&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Automated Performance at Scale:&lt;/strong&gt;&lt;br&gt;
HeatWave Autopilot automates processes to improve performance at scale, handling complex optimization tasks automatically.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Autopilot Capabilities:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Auto Provisioning:&lt;/strong&gt; Intelligent resource sizing&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Auto Parallel Load:&lt;/strong&gt; Optimized data loading&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Auto Query Plan Improvement:&lt;/strong&gt; Automatic query optimization&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Auto Scheduling:&lt;/strong&gt; Intelligent workload scheduling&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Auto Encoding:&lt;/strong&gt; Automatic data compression&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Auto Data Placement:&lt;/strong&gt; Optimal data distribution&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Auto Change Propagation:&lt;/strong&gt; Sync changes from object storage&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Auto Indexing:&lt;/strong&gt; Automatic index recommendations and management&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;getting-started-with-mysql-heatwave&quot;&gt;&lt;strong&gt;Getting Started with MySQL HeatWave&lt;/strong&gt;&lt;/h3&gt;
&lt;h4 id=&quot;provisioning-a-heatwave-instance&quot;&gt;&lt;strong&gt;Provisioning a HeatWave Instance&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;1. Access Cloud Console:&lt;/strong&gt;&lt;br&gt;
Navigate to MySQL HeatWave service in OCI, AWS, or Azure console&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;2. Create DB System:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Select cloud region&lt;/li&gt;
&lt;li&gt;Choose compute shape (HeatWave.Free, HeatWave.32GB, HeatWave.512GB)&lt;/li&gt;
&lt;li&gt;Configure storage&lt;/li&gt;
&lt;li&gt;Set up networking (VCN, subnet)&lt;/li&gt;
&lt;li&gt;Configure backups&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;3. Enable HeatWave Cluster:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Specify number of HeatWave nodes&lt;/li&gt;
&lt;li&gt;Select appropriate shape for workload&lt;/li&gt;
&lt;li&gt;Enable AutoML and GenAI features&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;4. Configure Security:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Set up users and privileges&lt;/li&gt;
&lt;li&gt;Configure network access controls&lt;/li&gt;
&lt;li&gt;Enable encryption&lt;/li&gt;
&lt;li&gt;Set up audit logging&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;loading-data&quot;&gt;&lt;strong&gt;Loading Data&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;From MySQL Database:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;-- Load table into HeatWave
ALTER TABLE sales SECONDARY_LOAD;

-- Load all tables in schema
CALL sys.heatwave_load(JSON_OBJECT('schema', 'sales_db'));
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;From Object Storage (Lakehouse):&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;-- Create external table
CREATE TABLE sales_external
ENGINE=RAPID
COMMENT='lakehouse:parquet'
AS SELECT * FROM performance_schema.file_locations
WHERE path = 's3://bucket/sales/*.parquet';

-- Load into HeatWave
ALTER TABLE sales_external SECONDARY_LOAD;
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;using-heatwave-genai&quot;&gt;&lt;strong&gt;Using HeatWave GenAI&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Generate Content:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;-- Generate text content
SELECT ML_GENERATE(
    'Write a product description for a smartphone',
    JSON_OBJECT('task', 'generation')
);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Semantic Search with Vector Store:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;-- Load documents into vector store
CALL sys.VECTOR_STORE_LOAD(
    's3://bucket/documents/',
    JSON_OBJECT('table_name', 'my_documents')
);

-- Perform RAG query
SELECT ML_RAG(
    'What are our return policies?',
    'my_documents',
    JSON_OBJECT('top_k', 5)
);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Natural Language Conversation:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;-- Chat with your data
CALL sys.HEATWAVE_CHAT(
    'Show me top selling products last quarter',
    JSON_OBJECT('store_name', 'sales_vectors')
);
&lt;/code&gt;&lt;/pre&gt;
&lt;h4 id=&quot;using-heatwave-automl&quot;&gt;&lt;strong&gt;Using HeatWave AutoML&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Train Model:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;-- Train predictive model
CALL sys.ML_TRAIN(
    'customer_data',
    'churn_prediction',
    'churn_flag',
    JSON_OBJECT('task', 'classification')
);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Make Predictions:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;-- Score new data
CALL sys.ML_PREDICT_TABLE(
    'customer_data',
    'churn_prediction',
    'predictions',
    NULL
);
&lt;/code&gt;&lt;/pre&gt;
&lt;h3 id=&quot;real-world-success-stories&quot;&gt;&lt;strong&gt;Real-World Success Stories&lt;/strong&gt;&lt;/h3&gt;
&lt;h4 id=&quot;smarterd-fast-tracked-development&quot;&gt;&lt;strong&gt;SmarterD: Fast-Tracked Development&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;SmarterD fast-tracked its roadmap by 12 months and went from development to production in only one month using Oracle MySQL HeatWave GenAI.&lt;/p&gt;
&lt;h4 id=&quot;ntt-solmare-revenue-growth&quot;&gt;&lt;strong&gt;NTT Solmare: Revenue Growth&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;NTT Solmare improved marketing campaigns and uncovered new revenue opportunities using HeatWave analytics and machine learning capabilities.&lt;/p&gt;
&lt;h4 id=&quot;fortune-100-applications&quot;&gt;&lt;strong&gt;Fortune 100 Applications&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;Fortune 100 companies use HeatWave AutoML for predictive maintenance, fraud detection, and personalized recommendations without machine learning expertise while keeping data secure within the database.&lt;/p&gt;
&lt;h3 id=&quot;best-practices-7&quot;&gt;&lt;strong&gt;Best Practices&lt;/strong&gt;&lt;/h3&gt;
&lt;h4 id=&quot;performance-optimization&quot;&gt;&lt;strong&gt;Performance Optimization&lt;/strong&gt;&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Enable HeatWave cluster for analytical workloads&lt;/li&gt;
&lt;li&gt;Use AUTO SECONDARY_LOAD for automatic data loading&lt;/li&gt;
&lt;li&gt;Leverage Autopilot recommendations&lt;/li&gt;
&lt;li&gt;Monitor query performance with Performance Schema&lt;/li&gt;
&lt;li&gt;Use bulk ingest for large data loads&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;cost-management&quot;&gt;&lt;strong&gt;Cost Management&lt;/strong&gt;&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Right-size compute shapes using Auto Shape Prediction&lt;/li&gt;
&lt;li&gt;Use HeatWave only when needed (start/stop capability)&lt;/li&gt;
&lt;li&gt;Leverage object storage for cold data&lt;/li&gt;
&lt;li&gt;Monitor usage with OCI Ops Insights integration&lt;/li&gt;
&lt;li&gt;Take advantage of HeatWave.Free tier for development&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;security&quot;&gt;&lt;strong&gt;Security&lt;/strong&gt;&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Enable encryption at rest and in transit&lt;/li&gt;
&lt;li&gt;Configure network access controls appropriately&lt;/li&gt;
&lt;li&gt;Use principle of least privilege for user accounts&lt;/li&gt;
&lt;li&gt;Enable audit logging for compliance&lt;/li&gt;
&lt;li&gt;Regularly review security configurations&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;genai-applications&quot;&gt;&lt;strong&gt;GenAI Applications&lt;/strong&gt;&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;Start with in-database LLMs for prototyping&lt;/li&gt;
&lt;li&gt;Use RAG with Vector Store for domain-specific accuracy&lt;/li&gt;
&lt;li&gt;Leverage Lakehouse Navigator for cost-effective searches&lt;/li&gt;
&lt;li&gt;Monitor LLM usage and response quality&lt;/li&gt;
&lt;li&gt;Implement guardrails for production deployments&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;conclusion-4&quot;&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;MySQL HeatWave represents a paradigm shift in database technology, delivering a unified platform for transaction processing, analytics, machine learning, and generative AI across multiple clouds. Developed and supported by the MySQL team at Oracle, HeatWave provides 100x faster analytics performance than standard MySQL while maintaining complete application compatibility.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Key Value Propositions:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Unified Platform:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Single service for OLTP, OLAP, ML, and GenAI&lt;/li&gt;
&lt;li&gt;No ETL between separate systems&lt;/li&gt;
&lt;li&gt;Simplified architecture and operations&lt;/li&gt;
&lt;li&gt;Reduced total cost of ownership&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Multi-Cloud Flexibility:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Deploy on OCI, AWS, or Azure&lt;/li&gt;
&lt;li&gt;Consistent experience across clouds&lt;/li&gt;
&lt;li&gt;Avoid vendor lock-in&lt;/li&gt;
&lt;li&gt;Support hybrid architectures&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Integrated AI:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In-database LLMs without data movement&lt;/li&gt;
&lt;li&gt;Automated vector store for RAG&lt;/li&gt;
&lt;li&gt;AutoML without AI expertise&lt;/li&gt;
&lt;li&gt;Natural language interfaces (NL2ML, NL2SQL)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Extreme Performance:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;100x faster than MySQL without HeatWave&lt;/li&gt;
&lt;li&gt;Outperforms cloud data warehouses&lt;/li&gt;
&lt;li&gt;15-30X faster vector search than competitors&lt;/li&gt;
&lt;li&gt;Real-time analytics on transactional data&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Fully Managed:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Automated provisioning, patching, backups&lt;/li&gt;
&lt;li&gt;Zero-downtime upgrades&lt;/li&gt;
&lt;li&gt;Intelligent automation with Autopilot&lt;/li&gt;
&lt;li&gt;Enterprise-grade security and compliance&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Whether building transaction-heavy applications, performing real-time analytics, developing machine learning models, or creating generative AI applications, MySQL HeatWave provides the comprehensive, integrated, and automated platform necessary for modern data-driven applications—all while maintaining the simplicity, familiarity, and compatibility of MySQL.&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://coderlegion.com/6966/mysql-heatwave-the-fully-managed-multi-cloud-database-with-integrated-ai</guid>
<pubDate>Thu, 30 Oct 2025 11:04:20 +0000</pubDate>
</item>
<item>
<title>Foreign Keys in MySQL for Serious System Design</title>
<link>https://coderlegion.com/6029/foreign-keys-in-mysql-for-serious-system-design</link>
<description>&lt;p&gt;Let’s face it: encountering foreign keys in MySQL is a classic developer rite of passage. At first, it's about linking tables—but swiftly turns into crafting a bulletproof web of relationships and rules that underpin entire data-driven systems. But at scale, these &lt;em&gt;seemingly simple constraints&lt;/em&gt; form the backbone of reliable, maintainable, and secure architectures.&lt;/p&gt;
&lt;p&gt;This isn’t just a guide to syntax. This is your &lt;strong&gt;comprehensive field manual&lt;/strong&gt; for wielding foreign keys: strategies, subtle caveats, best practices, and even architectural patterns favored by pros.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://www.mysqltutorial.org/wp-content/uploads/2019/08/customers-orders.png&quot; alt=&quot;MYSQL&quot;&gt;&lt;/p&gt;
&lt;h4 id=&quot;quick-refresher-what-are-foreign-keys-&quot;&gt;&lt;strong&gt;Quick Refresher: What are Foreign Keys?&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;A &lt;strong&gt;foreign key&lt;/strong&gt; is a column or set of columns in one table that references the primary key in another table, enforcing relationship integrity between records. Without them, you risk “orphan” data—think: orders without matching customers, employees reporting to non-existent managers, or posts referencing gone users.&lt;/p&gt;
&lt;h5 id=&quot;example-&quot;&gt;&lt;strong&gt;Example:&lt;/strong&gt;&lt;/h5&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;CREATE TABLE orders (
    order_id INT PRIMARY KEY,
    customer_id INT,
    FOREIGN KEY (customer_id) REFERENCES customers(customer_id)
);
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h4 id=&quot;advanced-foreign-key-tactics&quot;&gt;&lt;strong&gt;Advanced Foreign Key Tactics&lt;/strong&gt;&lt;/h4&gt;
&lt;h5 id=&quot;1-cascade-operations-controlling-your-data-s-life-cycle&quot;&gt;&lt;strong&gt;1. Cascade Operations: Controlling Your Data’s Life Cycle&lt;/strong&gt;&lt;/h5&gt;
&lt;p&gt;The magic of MySQL’s foreign keys isn’t just the linking—it's about controlling &lt;em&gt;what happens&lt;/em&gt; on updates or deletes. Choose from:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;CASCADE&lt;/code&gt;&lt;/strong&gt;: Mods or deletes in the parent auto-propagate to children. Delete a customer? Their orders vanish too.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;SET NULL&lt;/code&gt;&lt;/strong&gt;: Leaves child reference as &lt;code&gt;NULL&lt;/code&gt; if parent goes away—if your business logic allows “detached” records.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;RESTRICT&lt;/code&gt;&lt;/strong&gt;/&lt;code&gt;NO ACTION&lt;/code&gt;: Block changes if dependencies remain. Most conservative.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;When to Use What?&lt;/strong&gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;&lt;th&gt;Operation    &lt;/th&gt;&lt;th&gt;Use Case Example                                                                 &lt;/th&gt;&lt;th&gt;Beware...&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;CASCADE      &lt;/td&gt;&lt;td&gt;Orders deleted when customer is deleted                                          &lt;/td&gt;&lt;td&gt;Unintended mass deletions, data loss&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;SET NULL     &lt;/td&gt;&lt;td&gt;Product discontinued, but not deleting sale history                              &lt;/td&gt;&lt;td&gt;Nullability: Foreign key columns must allow it&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;RESTRICT     &lt;/td&gt;&lt;td&gt;Employees can’t be deleted if they manage teams                                  &lt;/td&gt;&lt;td&gt;Can hinder batch deletes/updates&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;hr&gt;
&lt;h5 id=&quot;2-many-to-many-amp-junction-tables&quot;&gt;&lt;strong&gt;2. Many-to-Many &amp;amp; Junction Tables&lt;/strong&gt;&lt;/h5&gt;
&lt;p&gt;Not all relationships are one-to-many. &lt;strong&gt;Many-to-many&lt;/strong&gt; needs a &lt;em&gt;junction&lt;/em&gt; (associative) table with two or more foreign keys.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Example: Users and Roles&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;CREATE TABLE user_roles (
    user_id INT,
    role_id INT,
    PRIMARY KEY(user_id, role_id),
    FOREIGN KEY (user_id) REFERENCES users(user_id),
    FOREIGN KEY (role_id) REFERENCES roles(role_id)
);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This prevents a user from having invalid roles and vice-versa.&lt;/p&gt;
&lt;hr&gt;
&lt;h5 id=&quot;3-self-referential-amp-hierarchical-relationships&quot;&gt;&lt;strong&gt;3. Self-Referential &amp;amp; Hierarchical Relationships&lt;/strong&gt;&lt;/h5&gt;
&lt;p&gt;Foreign keys can reference the &lt;em&gt;same&lt;/em&gt; table (think: management hierarchy or tree categories):&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;CREATE TABLE employees (
    employee_id INT PRIMARY KEY,
    manager_id INT,
    FOREIGN KEY (manager_id) REFERENCES employees(employee_id)
);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This enables recursive queries and elegant modeling of organizational trees.&lt;/p&gt;
&lt;hr&gt;
&lt;h5 id=&quot;4-deferrable-constraints-not-native-in-mysql-yet-&quot;&gt;&lt;strong&gt;4. Deferrable Constraints (Not Native in MySQL Yet)&lt;/strong&gt;&lt;/h5&gt;
&lt;p&gt;Some databases let you defer foreign key checks till commit. MySQL doesn't natively support this (as of v8.0), but it’s crucial to know if you’re porting designs—sometimes, you need to temporarily violate constraints in multi-step transactions.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Workaround&lt;/strong&gt;: Drop constraints, perform bulk actions, re-add and validate—&lt;em&gt;dangerous if not careful&lt;/em&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h5 id=&quot;5-foreign-key-indexing-for-performance&quot;&gt;&lt;strong&gt;5. Foreign Key Indexing for Performance&lt;/strong&gt;&lt;/h5&gt;
&lt;p&gt;Every foreign key column, &lt;strong&gt;especially in large tables&lt;/strong&gt;, must be indexed! MySQL often creates indexes automatically, but manual indexing ensures optimal joins, cascades, and validation efficiency.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;CREATE INDEX idx_orders_customer_id ON orders(customer_id);
&lt;/code&gt;&lt;/pre&gt;
&lt;hr&gt;
&lt;h4 id=&quot;potential-pitfalls-amp-best-practices&quot;&gt;&lt;strong&gt;Potential Pitfalls &amp;amp; Best Practices&lt;/strong&gt;&lt;/h4&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;&lt;th&gt;Pitfall                 &lt;/th&gt;&lt;th&gt;Impact/Example                                       &lt;/th&gt;&lt;th&gt;Best Practices&lt;/th&gt;&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;Mismatched Datatypes    &lt;/td&gt;&lt;td&gt;INT in one, BIGINT in another = constraint fails     &lt;/td&gt;&lt;td&gt;Match PK and FK datatypes exactly&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Circular Dependencies   &lt;/td&gt;&lt;td&gt;Table A FK B, B FK A --&amp;gt; deadlocks, migrations pain &lt;/td&gt;&lt;td&gt;Avoid unless model strictly requires; batch disables&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Large Cascading Deletes &lt;/td&gt;&lt;td&gt;Deletes millions unintentionally                     &lt;/td&gt;&lt;td&gt;Use &lt;code&gt;RESTRICT&lt;/code&gt; or disable, and log deletes&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Orphaned Data           &lt;/td&gt;&lt;td&gt;Data in child table with no valid parent             &lt;/td&gt;&lt;td&gt;Enforce referential integrity via FKs&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td&gt;Bulk Data Loads         &lt;/td&gt;&lt;td&gt;INSERTs/LOADs slower due to constraint checks        &lt;/td&gt;&lt;td&gt;Temporarily disable FKs during trusted imports&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;hr&gt;
&lt;h4 id=&quot;beyond-basics-multi-table-and-polymorphic-relations&quot;&gt;&lt;strong&gt;Beyond Basics: Multi-Table and Polymorphic Relations&lt;/strong&gt;&lt;/h4&gt;
&lt;h5 id=&quot;composite-foreign-keys&quot;&gt;&lt;strong&gt;Composite Foreign Keys&lt;/strong&gt;&lt;/h5&gt;
&lt;p&gt;Sometimes, relationships are defined by &lt;em&gt;multiple columns&lt;/em&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;CREATE TABLE shipments (
    order_id INT,
    item_id INT,
    ...
    FOREIGN KEY (order_id, item_id) REFERENCES order_items(order_id, item_id)
);
&lt;/code&gt;&lt;/pre&gt;
&lt;h5 id=&quot;polymorphic-association-the-anti-pattern-&quot;&gt;&lt;strong&gt;Polymorphic Association (the Anti-pattern)&lt;/strong&gt;&lt;/h5&gt;
&lt;p&gt;If you need a comment to belong to either a blog post or a photo—MySQL won’t let you set a FK to multiple tables. This is called a &lt;strong&gt;polymorphic association&lt;/strong&gt; and is discouraged in strict relational design—better to have a dedicated join table per association, or use inheritance-like strategies.&lt;/p&gt;
&lt;hr&gt;
&lt;h4 id=&quot;enterprise-patterns-audit-trails-soft-deletes-and-data-warehousing&quot;&gt;&lt;strong&gt;Enterprise Patterns: Audit Trails, Soft Deletes, and Data Warehousing&lt;/strong&gt;&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Soft Deletes&lt;/strong&gt;: Instead of deleting, mark as &lt;code&gt;deleted_at&lt;/code&gt;. &lt;strong&gt;Don’t cascade deletes&lt;/strong&gt; on these columns, handle logically.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Audit Trails&lt;/strong&gt;: Log every change; foreign keys can help tie logs to users/actions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Data Warehousing / ETL&lt;/strong&gt;: Foreign keys are often dropped in warehouse schemas for performance—integrity must be enforced during loading (ETL).&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h4 id=&quot;real-world-example-e-commerce-data-model-expanded&quot;&gt;&lt;strong&gt;Real-World Example: E-commerce Data Model—Expanded&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Tables:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Customers&lt;/code&gt; (&lt;code&gt;customer_id&lt;/code&gt;, &lt;code&gt;name&lt;/code&gt;, &lt;code&gt;email&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Orders&lt;/code&gt; (&lt;code&gt;order_id&lt;/code&gt;, &lt;code&gt;customer_id&lt;/code&gt;, &lt;code&gt;order_date&lt;/code&gt;, &lt;code&gt;status&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Products&lt;/code&gt; (&lt;code&gt;product_id&lt;/code&gt;, &lt;code&gt;name&lt;/code&gt;, &lt;code&gt;category_id&lt;/code&gt;, &lt;code&gt;price&lt;/code&gt;, &lt;code&gt;stock_quantity&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Order_Items&lt;/code&gt; (&lt;code&gt;order_item_id&lt;/code&gt;, &lt;code&gt;order_id&lt;/code&gt;, &lt;code&gt;product_id&lt;/code&gt;, &lt;code&gt;quantity&lt;/code&gt;, &lt;code&gt;subtotal&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Categories&lt;/code&gt; (&lt;code&gt;category_id&lt;/code&gt;, &lt;code&gt;name&lt;/code&gt;, &lt;code&gt;parent_category_id&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Reviews&lt;/code&gt; (&lt;code&gt;review_id&lt;/code&gt;, &lt;code&gt;product_id&lt;/code&gt;, &lt;code&gt;customer_id&lt;/code&gt;, &lt;code&gt;stars&lt;/code&gt;, &lt;code&gt;comment&lt;/code&gt;, &lt;code&gt;created_at&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Coupons&lt;/code&gt; (&lt;code&gt;coupon_id&lt;/code&gt;, &lt;code&gt;code&lt;/code&gt;, &lt;code&gt;discount_percent&lt;/code&gt;, &lt;code&gt;expires_at&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Order_Coupons&lt;/code&gt; (&lt;code&gt;order_id&lt;/code&gt;, &lt;code&gt;coupon_id&lt;/code&gt;)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Sample Foreign Key Usage:&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sql&quot;&gt;ALTER TABLE orders
    ADD CONSTRAINT fk_customer FOREIGN KEY (customer_id)
        REFERENCES customers(customer_id)
        ON DELETE RESTRICT;

ALTER TABLE order_items
    ADD CONSTRAINT fk_order FOREIGN KEY(order_id)
        REFERENCES orders(order_id)
        ON DELETE CASCADE, 
    ADD CONSTRAINT fk_product FOREIGN KEY(product_id)
        REFERENCES products(product_id)
        ON DELETE RESTRICT;

ALTER TABLE products
    ADD CONSTRAINT fk_category FOREIGN KEY(category_id)
        REFERENCES categories(category_id)
        ON DELETE SET NULL;

ALTER TABLE reviews
    ADD CONSTRAINT fk_review_product
        FOREIGN KEY (product_id) REFERENCES products(product_id)
        ON DELETE CASCADE,
    ADD CONSTRAINT fk_review_customer
        FOREIGN KEY (customer_id) REFERENCES customers(customer_id)
        ON DELETE SET NULL;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Features Achieved:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Orders tied strictly to real customers; orphans impossible.&lt;/li&gt;
&lt;li&gt;Deleting a product deletes its reviews, but not historical order records.&lt;/li&gt;
&lt;li&gt;Deleting a category doesn’t nuke the products—only unclassifies them.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h4 id=&quot;foreign-keys-and-orm-mappings-advanced-&quot;&gt;&lt;strong&gt;Foreign Keys and ORM Mappings (Advanced)&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;Using ORMs like SQLAlchemy, Hibernate, or Django ORM? Foreign keys are the link between your domain models. Properly defined, they:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Enable cascading saves/deletes in code.&lt;/li&gt;
&lt;li&gt;Enable reverse lookups and eager/lazy loading.&lt;/li&gt;
&lt;li&gt;Ensure constraints enforced at both DB and code layer.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Pro tip:&lt;/strong&gt; Always &lt;em&gt;mirror&lt;/em&gt; your DB constraints in your ORM models, and don’t rely solely on ORM-level validation.&lt;/p&gt;
&lt;hr&gt;
&lt;h4 id=&quot;for-the-data-architects-when-not-to-use-foreign-keys&quot;&gt;&lt;strong&gt;For The Data Architects: When NOT to Use Foreign Keys&lt;/strong&gt;&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;High-Volume Event Logs&lt;/strong&gt;: Can slow inserts; consider only if strong integrity is a must.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Denormalized Warehouses&lt;/strong&gt;: Use constraints during ETL, not at warehouse runtime.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Third-Party/Cross-DB Data&lt;/strong&gt;: Can’t enforce with foreign keys; use programmatic or scheduled validations.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Microservices&lt;/strong&gt;: Sometimes, each service owns its data: cross-database FK constraints can break scaling and autonomy.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h4 id=&quot;checklist-production-ready-foreign-key-design&quot;&gt;&lt;strong&gt;Checklist: Production-Ready Foreign Key Design&lt;/strong&gt;&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;All FKs indexed?&lt;/li&gt;
&lt;li&gt;Datatypes &lt;em&gt;exactly&lt;/em&gt; match?&lt;/li&gt;
&lt;li&gt;All cascade options reviewed and intentional?&lt;/li&gt;
&lt;li&gt;No accidental circular references?&lt;/li&gt;
&lt;li&gt;Soft deletes and TTL data not cascaded on delete?&lt;/li&gt;
&lt;li&gt;Batch loads/disables FKs as needed?&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h4 id=&quot;resources-for-further-mastery&quot;&gt;&lt;strong&gt;Resources for Further Mastery&lt;/strong&gt;&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;MySQL Foreign Key Docs:&lt;/strong&gt; &lt;em&gt;Deep-dive with syntax and real-world use cases.&lt;/em&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Normalization and ER Diagrams:&lt;/strong&gt; Strengthen foundation in data modeling.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Books:&lt;/strong&gt; “SQL Antipatterns” (Bill Karwin), “Designing Data-Intensive Applications” (Martin Kleppmann).&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;p&gt;&lt;strong&gt;In summary:&lt;/strong&gt; Foreign keys are your shield &lt;em&gt;and&lt;/em&gt; your sword—&lt;em&gt;they safeguard data integrity, enable powerful querying, and make your system maintainable at scale—but demand planning, discipline, and regular review&lt;/em&gt;.&lt;/p&gt;
</description>
<category>Data Engineering</category>
<guid isPermaLink="true">https://coderlegion.com/6029/foreign-keys-in-mysql-for-serious-system-design</guid>
<pubDate>Fri, 03 Oct 2025 21:33:56 +0000</pubDate>
</item>
<item>
<title>MySQL HeatWave and Oracle NoSQL: Modern Database Solutions for Enterprise Applications</title>
<link>https://coderlegion.com/5441/mysql-heatwave-and-oracle-nosql-modern-database-solutions-for-enterprise-applications</link>
<description>&lt;p&gt;Modern enterprises require database solutions that can handle diverse workloads, from traditional transactions to real-time analytics and flexible data models. MySQL HeatWave and Oracle NoSQL Database Service represent Oracle's comprehensive approach to addressing these varied requirements through innovative, cloud-native database technologies.&lt;/p&gt;
&lt;h3 id=&quot;mysql-heatwave-unified-oltp-and-olap-platform&quot;&gt;&lt;strong&gt;MySQL HeatWave: Unified OLTP and OLAP Platform&lt;/strong&gt;&lt;/h3&gt;
&lt;h4 id=&quot;the-traditional-database-challenge&quot;&gt;&lt;strong&gt;The Traditional Database Challenge&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;Traditional MySQL deployments are optimized for Online Transaction Processing (OLTP) workloads but struggle with analytical queries. This limitation has historically forced organizations to implement complex architectures:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Complex ETL Processes:&lt;/strong&gt; Data must be extracted, transformed, and loaded into separate analytical systems&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;No Real-Time Analytics:&lt;/strong&gt; Batch processing creates delays between transactions and insights&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Security and Compliance Risks:&lt;/strong&gt; Data duplication across multiple systems increases vulnerability surface&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Increased Operational Costs:&lt;/strong&gt; Managing multiple database platforms requires additional resources and expertise&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;mysql-heatwave-revolutionary-integration&quot;&gt;&lt;strong&gt;MySQL HeatWave: Revolutionary Integration&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;MySQL HeatWave provides automated and integrated generative AI and machine learning (ML) in one cloud service for transactions and lakehouse scale analytics, fundamentally changing how organizations approach data management.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Core Value Propositions:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Unified Service:&lt;/strong&gt; Single platform handling OLTP, OLAP, Machine Learning, and Lakehouse analytics&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Elimination of ETL Duplication:&lt;/strong&gt; Real-time analytics on data in MySQL Database and object storage without extract, transform, and load (ETL) duplication&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Unmatched Performance:&lt;/strong&gt; Significant performance improvements at reduced costs compared to traditional approaches&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Real-Time Analytics:&lt;/strong&gt; Analytics queries access the most current information as updates from transactions automatically replicate in real time&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Enhanced Security:&lt;/strong&gt; Consolidated security model reduces complexity and risk&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;High Application Availability:&lt;/strong&gt; Built-in redundancy and failover capabilities&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;mysql-heatwave-architecture-and-features&quot;&gt;&lt;strong&gt;MySQL HeatWave Architecture and Features&lt;/strong&gt;&lt;/h3&gt;
&lt;h4 id=&quot;heatwave-lakehouse-1&quot;&gt;&lt;strong&gt;HeatWave Lakehouse&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;HeatWave Lakehouse enables organizations to analyze massive datasets stored in various file formats without traditional data warehouse limitations.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Supported File Formats:&lt;/strong&gt;&lt;br&gt;
MySQL HeatWave Lakehouse supports a diverse range of object store file formats, inclusive of Parquet, CSV, and database exports, providing unprecedented flexibility for data integration.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Key Capabilities:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Query petabyte-scale datasets directly from object storage&lt;/li&gt;
&lt;li&gt;Support for structured, semi-structured, and unstructured data&lt;/li&gt;
&lt;li&gt;Automatic data discovery and schema inference&lt;/li&gt;
&lt;li&gt;Cost-effective storage for historical and archival data&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;heatwave-automl&quot;&gt;&lt;strong&gt;HeatWave AutoML&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;HeatWave AutoML democratizes machine learning by providing comprehensive ML capabilities integrated directly into the database platform.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;AutoML Features:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Complete ML Lifecycle:&lt;/strong&gt; Build, train, deploy, and explain ML models without additional costs&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Popular Integration:&lt;/strong&gt; Integrated with popular notebooks such as Jupyter notebooks and Apache Zeppelin&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Automated Model Selection:&lt;/strong&gt; Intelligent algorithm selection based on data characteristics&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;In-Database Processing:&lt;/strong&gt; Models execute directly within the database for maximum performance&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;mysql-autopilot&quot;&gt;&lt;strong&gt;MySQL Autopilot&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;MySQL Autopilot represents Oracle's commitment to autonomous database operations, automating critical performance optimization tasks.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Automation Capabilities:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Intelligent Provisioning:&lt;/strong&gt; Automatic resource allocation based on workload patterns&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Optimized Data Loading:&lt;/strong&gt; Automated data distribution and indexing strategies&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Query Execution Optimization:&lt;/strong&gt; Real-time query plan optimization and tuning&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Predictive Scaling:&lt;/strong&gt; Proactive resource scaling based on usage patterns&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;mysql-heatwave-service-characteristics&quot;&gt;&lt;strong&gt;MySQL HeatWave Service Characteristics&lt;/strong&gt;&lt;/h3&gt;
&lt;h4 id=&quot;ease-of-use-and-management&quot;&gt;&lt;strong&gt;Ease of Use and Management&lt;/strong&gt;&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Fully Managed Service:&lt;/strong&gt; Oracle handles infrastructure management, patching, and maintenance&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Instant Provisioning:&lt;/strong&gt; Rapid deployment with latest features and capabilities&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Intuitive Interface:&lt;/strong&gt; Simplified administration through Oracle Cloud Console&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Automated Operations:&lt;/strong&gt; Self-tuning and self-optimizing capabilities&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;security-and-compliance&quot;&gt;&lt;strong&gt;Security and Compliance&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Enterprise-Grade Security:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Built on Oracle's Generation 2 Cloud Infrastructure&lt;/li&gt;
&lt;li&gt;Comprehensive encryption for data at rest and in transit&lt;/li&gt;
&lt;li&gt;Advanced access controls and audit capabilities&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Regulatory Compliance:&lt;/strong&gt; Meets GDPR, PCI DSS, and HIPAA requirements&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;enterprise-readiness&quot;&gt;&lt;strong&gt;Enterprise Readiness&lt;/strong&gt;&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;High Reliability:&lt;/strong&gt; 99.95% availability SLA with built-in redundancy&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;24/7 Support:&lt;/strong&gt; Oracle's global support organization&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Oracle Integration:&lt;/strong&gt; Seamless integration with Oracle's technology stack&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;100% MySQL Compatibility:&lt;/strong&gt; Full compatibility with on-premises MySQL applications&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;multi-cloud-deployment&quot;&gt;&lt;strong&gt;Multi-Cloud Deployment&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;You can deploy HeatWave on OCI, AWS, or Azure. You can replicate data from on-premises OLTP applications to HeatWave to get near real-time analytics, providing unprecedented deployment flexibility.&lt;/p&gt;
&lt;h3 id=&quot;oracle-nosql-database-service&quot;&gt;&lt;strong&gt;Oracle NoSQL Database Service&lt;/strong&gt;&lt;/h3&gt;
&lt;h4 id=&quot;modern-application-challenges&quot;&gt;&lt;strong&gt;Modern Application Challenges&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;Contemporary applications face unprecedented demands that traditional relational databases struggle to address:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;High-Volume, High-Velocity Data:&lt;/strong&gt; Applications generate massive amounts of data at extreme speeds&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Rapid Innovation Cycles:&lt;/strong&gt; Development teams require database flexibility to support fast feature delivery&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Elastic Scaling Requirements:&lt;/strong&gt; Workloads demand dynamic throughput and storage scaling&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Always-On Availability:&lt;/strong&gt; Users expect 24/7 service availability across global deployments&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;oracle-nosql-database-service-solution&quot;&gt;&lt;strong&gt;Oracle NoSQL Database Service Solution&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;The service offers active-active regional replication, ACID transactions, serverless scaling, comprehensive security, and low pay-per-use pricing for both on-demand and provisioned capacity modes.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Core Service Characteristics:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Fully Managed:&lt;/strong&gt; Zero-administration database service&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Elastic Scaling:&lt;/strong&gt; Automatic scaling based on demand&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;High Performance:&lt;/strong&gt; Predictable low-latency responses&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Developer Friendly:&lt;/strong&gt; Multiple programming language support and intuitive APIs&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Hybrid Cloud:&lt;/strong&gt; Seamless integration across cloud and on-premises environments&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Data Model Flexibility:&lt;/strong&gt; Support for multiple data models within single service&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Enterprise Security:&lt;/strong&gt; Comprehensive encryption, authentication, and access controls&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cost Optimization:&lt;/strong&gt; Pay-per-use pricing model with reserved capacity options&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;oracle-nosql-database-use-cases&quot;&gt;&lt;strong&gt;Oracle NoSQL Database Use Cases&lt;/strong&gt;&lt;/h3&gt;
&lt;h4 id=&quot;modern-application-patterns&quot;&gt;&lt;strong&gt;Modern Application Patterns&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Mobile and IoT Applications:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;High-frequency data ingestion from sensors and devices&lt;/li&gt;
&lt;li&gt;Real-time user interaction tracking&lt;/li&gt;
&lt;li&gt;Location-based services and geospatial queries&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Customer Experience Platforms:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;360-degree customer view aggregation&lt;/li&gt;
&lt;li&gt;User profile management and personalization&lt;/li&gt;
&lt;li&gt;Real-time recommendation engines&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Digital Commerce:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Product catalog management with flexible schemas&lt;/li&gt;
&lt;li&gt;Shopping cart and session management&lt;/li&gt;
&lt;li&gt;Inventory tracking and real-time updates&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Content and Media:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Content management systems with multimedia support&lt;/li&gt;
&lt;li&gt;Social network activity feeds and notifications&lt;/li&gt;
&lt;li&gt;Real-time messaging and communication platforms&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Enterprise Applications:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Online advertising campaign management&lt;/li&gt;
&lt;li&gt;Real-time big data analytics and processing&lt;/li&gt;
&lt;li&gt;Gaming leaderboards and player statistics&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;developer-experience&quot;&gt;&lt;strong&gt;Developer Experience&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Multi-Cloud Deployment:&lt;/strong&gt;&lt;br&gt;
Applications can run consistently across any cloud environment, providing deployment flexibility and vendor independence.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Flexible Data Models:&lt;/strong&gt;&lt;br&gt;
Supports JSON, Table and Key-Value datatypes, all with flexible transaction guarantees:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Document Model:&lt;/strong&gt; Schema-less JSON document storage&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Key-Value Model:&lt;/strong&gt; Simple key-value pair storage for caching and sessions&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Columnar Schema:&lt;/strong&gt; Traditional structured data with fixed schemas&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Security Integration:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Encryption:&lt;/strong&gt; Data protection at rest and in transit&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Authentication:&lt;/strong&gt; Integration with enterprise identity systems&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Access Control:&lt;/strong&gt; Fine-grained permissions and role-based access&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;oracle-nosql-database-features&quot;&gt;&lt;strong&gt;Oracle NoSQL Database Features&lt;/strong&gt;&lt;/h3&gt;
&lt;h4 id=&quot;scalability-and-performance&quot;&gt;&lt;strong&gt;Scalability and Performance&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Elastic Scaling:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Table-Level Scaling:&lt;/strong&gt; Independent scaling for different application components&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Instant Elasticity:&lt;/strong&gt; Automatic resource adjustment based on demand&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Predictable Performance:&lt;/strong&gt; Consistent low-latency responses across scale levels&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;High Availability:&lt;/strong&gt;&lt;br&gt;
Oracle NoSQL Database Cloud Service (NDCS) is a fully HA service designed for highly demanding applications that require low latency response times&lt;/p&gt;
&lt;h4 id=&quot;development-flexibility&quot;&gt;&lt;strong&gt;Development Flexibility&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Time-to-Live (TTL) Support:&lt;/strong&gt;&lt;br&gt;
Automatic data expiration for temporary data and compliance requirements.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;API and SQL Access:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;RESTful APIs for modern application integration&lt;/li&gt;
&lt;li&gt;SQL query support for familiar development patterns&lt;/li&gt;
&lt;li&gt;Multiple SDK support for popular programming languages&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Advanced Indexing:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Secondary Indexes:&lt;/strong&gt; Support for simple scalars, non-scalars, composite, and JSON indexes&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Rich Query Support:&lt;/strong&gt; Complex query capabilities with SQL-like syntax&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Geospatial Queries:&lt;/strong&gt; Location-based query support for mobile applications&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;latest-enhancements&quot;&gt;&lt;strong&gt;Latest Enhancements&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Developer Tooling:&lt;/strong&gt;&lt;br&gt;
Enhanced Visual Studio Code and IntelliJ plugins with form-based column entry and DDL statement support&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Migration Support:&lt;/strong&gt;&lt;br&gt;
NoSQL Database Migrator supports session token-based authentication and OKE Workload Identity Authentication&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;SDK Expansion:&lt;/strong&gt;&lt;br&gt;
Oracle NoSQL Database Cloud Service supports Rust SDK for comprehensive application development&lt;/p&gt;
&lt;h3 id=&quot;integration-and-management&quot;&gt;&lt;strong&gt;Integration and Management&lt;/strong&gt;&lt;/h3&gt;
&lt;h4 id=&quot;oracle-cloud-console-access&quot;&gt;&lt;strong&gt;Oracle Cloud Console Access&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;Both MySQL HeatWave and Oracle NoSQL Database Service provide comprehensive management through the Oracle Cloud Console:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Unified Dashboard:&lt;/strong&gt; Single interface for monitoring and management&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Performance Metrics:&lt;/strong&gt; Real-time performance monitoring and alerting&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Security Management:&lt;/strong&gt; Centralized security policy and access control&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cost Optimization:&lt;/strong&gt; Usage tracking and cost management tools&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;enterprise-integration&quot;&gt;&lt;strong&gt;Enterprise Integration&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;Oracle Technology Stack:&lt;/strong&gt;&lt;br&gt;
Seamless integration with Oracle's comprehensive technology portfolio including:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Oracle Analytics Cloud for advanced analytics&lt;/li&gt;
&lt;li&gt;Oracle Integration Cloud for application connectivity&lt;/li&gt;
&lt;li&gt;Oracle Identity Cloud Service for authentication and authorization&lt;/li&gt;
&lt;li&gt;Oracle Management Cloud for monitoring and operations&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;choosing-the-right-solution&quot;&gt;&lt;strong&gt;Choosing the Right Solution&lt;/strong&gt;&lt;/h3&gt;
&lt;h4 id=&quot;mysql-heatwave-ideal-for-&quot;&gt;&lt;strong&gt;MySQL HeatWave Ideal For:&lt;/strong&gt;&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Transactional Applications:&lt;/strong&gt; Applications requiring both OLTP and real-time analytics&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Data Consolidation:&lt;/strong&gt; Organizations looking to eliminate data silos&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;ML-Driven Applications:&lt;/strong&gt; Applications requiring integrated machine learning capabilities&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Cost Optimization:&lt;/strong&gt; Organizations seeking to reduce infrastructure complexity&lt;/li&gt;
&lt;/ul&gt;
&lt;h4 id=&quot;oracle-nosql-database-ideal-for-&quot;&gt;&lt;strong&gt;Oracle NoSQL Database Ideal For:&lt;/strong&gt;&lt;/h4&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Modern Applications:&lt;/strong&gt; Applications requiring flexible data models and elastic scaling&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;High-Volume Scenarios:&lt;/strong&gt; Applications with extreme throughput requirements&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Global Applications:&lt;/strong&gt; Applications requiring multi-region deployment&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Developer Productivity:&lt;/strong&gt; Teams requiring rapid development and deployment cycles&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;future-considerations&quot;&gt;&lt;strong&gt;Future Considerations&lt;/strong&gt;&lt;/h3&gt;
&lt;h4 id=&quot;emerging-trends&quot;&gt;&lt;strong&gt;Emerging Trends&lt;/strong&gt;&lt;/h4&gt;
&lt;p&gt;&lt;strong&gt;AI and ML Integration:&lt;/strong&gt;&lt;br&gt;
Both platforms continue evolving to provide deeper AI/ML integration, enabling intelligent applications with minimal development complexity.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Edge Computing:&lt;/strong&gt;&lt;br&gt;
Support for edge deployment scenarios where applications require local data processing capabilities.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Multi-Cloud Strategy:&lt;/strong&gt;&lt;br&gt;
Enhanced support for hybrid and multi-cloud deployments, providing maximum deployment flexibility.&lt;/p&gt;
&lt;h3 id=&quot;conclusion-5&quot;&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;MySQL HeatWave and Oracle NoSQL Database Service represent Oracle's commitment to providing comprehensive database solutions for modern enterprise requirements. MySQL HeatWave's unique integration of OLTP and OLAP in a single system, combined with built-in Data Lakehouse and advanced machine learning capabilities, addresses the complexity of traditional analytical architectures.&lt;/p&gt;
&lt;p&gt;Similarly, Oracle NoSQL Database Service provides the flexibility and scale required for modern application development, with active-active regional replication, ACID transactions, and serverless scaling capabilities.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Key Decision Factors:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Data Consistency Requirements:&lt;/strong&gt; ACID transactions vs. eventual consistency models&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Query Complexity:&lt;/strong&gt; SQL analytics vs. simple key-value operations  &lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Scaling Patterns:&lt;/strong&gt; Vertical vs. horizontal scaling requirements&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Development Timeline:&lt;/strong&gt; Existing MySQL expertise vs. modern application patterns&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Both solutions provide enterprise-grade security, reliability, and Oracle's comprehensive support, enabling organizations to choose the optimal database platform based on specific application requirements and architectural preferences.&lt;/p&gt;
&lt;p&gt;Whether implementing real-time analytics with MySQL HeatWave or building flexible, scalable applications with Oracle NoSQL Database Service, organizations can leverage Oracle's cloud-native database technologies to accelerate innovation and reduce operational complexity.&lt;/p&gt;
</description>
<category>Database</category>
<guid isPermaLink="true">https://coderlegion.com/5441/mysql-heatwave-and-oracle-nosql-modern-database-solutions-for-enterprise-applications</guid>
<pubDate>Wed, 17 Sep 2025 19:37:20 +0000</pubDate>
</item>
</channel>
</rss>