All Products
Search
Document Center

Data Transmission Service:Synchronize data from RDS MariaDB TX to RDS MySQL

Last Updated:Jun 03, 2026

DTS supports schema, full, and incremental data synchronization from an ApsaraDB RDS for MariaDB TX instance to an ApsaraDB RDS for MySQL instance.

Prerequisites

Before you begin, make sure that you have:

Billing

Synchronization type Fee
Schema synchronization and full data synchronization Free of charge
Incremental data synchronization Charged. Billing overview.

Permissions required for database accounts

Database Required permission References
Source RDS MariaDB TX instance Read and write permissions on the objects to be synchronized Create an account and Modify or reset account permissions
Destination RDS MySQL instance Read and write permissions on the destination database Create an account and Modify account permissions

Supported SQL operations for incremental synchronization

Operation type SQL statement
DML INSERT, UPDATE, and DELETE
DDL ALTER TABLE, ALTER VIEW, CREATE FUNCTION, CREATE INDEX, CREATE PROCEDURE, CREATE TABLE, CREATE VIEW, DROP INDEX, DROP TABLE, RENAME TABLE, and TRUNCATE TABLE
Important

RENAME TABLE can cause data inconsistency. If you rename a table selected as a synchronization object, its data stops synchronizing to the destination. To avoid this, select the database that contains the table as the synchronization object. Ensure both the pre-rename and post-rename databases are included in the synchronization objects.

Limitations

Source database requirements

  • Tables to synchronize must have PRIMARY KEY or UNIQUE constraints with all fields unique. Otherwise, the destination may contain duplicate records.

  • If you select tables as synchronization objects and need to rename them in the destination, a single task supports up to 1,000 tables. For more than 1,000 tables, use multiple tasks or synchronize the entire database.

  • Binary logging is enabled by default on RDS MariaDB instances. Ensure the binlog_row_image parameter is set to full. Otherwise, the precheck fails and the synchronization task cannot start.

  • Binary log retention: If DTS cannot obtain binary logs, the task may fail, or data inconsistency and data loss may occur. The DTS SLA does not cover issues caused by insufficient log retention.

    • Incremental-only synchronization: at least 24 hours

    • Full and incremental synchronization: at least 7 days. After full data synchronization is complete, set the retention period to more than 24 hours.

Foreign key behavior

  • During schema synchronization, DTS synchronizes foreign keys to the destination.

  • During full and incremental synchronization, DTS temporarily disables foreign key constraint checks and cascade operations at the session level.

  • Cascade update and delete operations on the source database during synchronization may cause data inconsistency.

Runtime restrictions

  • Performance impact: Full data synchronization consumes resources on both source and destination databases. Schedule synchronization during off-peak hours.

  • Table fragmentation: Concurrent INSERT operations during full synchronization cause fragmentation in destination tables, making the destination tablespace larger than the source.

  • DDL operations on selected tables: If you select specific tables (not an entire database) as synchronization objects, do not use pt-online-schema-change or similar tools during synchronization. Use DMS lock-free DDL operations instead.

  • Writes to the destination database: Use only DTS to write to the destination during synchronization. If other tools write to the destination, do not use DMS for online DDL operations because data loss may occur.

  • Failed DDL in the destination: If DDL statements fail in the destination, the DTS task continues running. Check task logs for details.

  • Case-insensitive column names: MySQL column names are case-insensitive. If multiple source columns differ only in capitalization, their data is written to the same destination column, which can cause unexpected results.

  • Post-synchronization verification: After the task Status changes to Completed, run analyze table <Table name> to verify data in the destination table. If an HA switchover occurs on the source MySQL instance, data may exist only in memory, causing data loss.

Procedure

Step 1: Open the data synchronization page

Access the Data Synchronization page and select the region of the data synchronization instance.

DTS console

  1. Log on to the DTS console.

  2. In the left-side navigation pane, click Data Synchronization.

  3. In the upper-left corner of the page, select the region where the data synchronization instance resides.

DMS console

Operations may vary with the DMS console mode and layout. Simple mode. Customize the layout and style of the DMS console.
  1. Log on to the DMS console.

  2. In the top navigation bar, move the pointer over Data + AI and choose DTS (DTS) > Data Synchronization.

  3. From the drop-down list to the right of Data Synchronization Tasks, select the region where the data synchronization instance resides.

Step 2: Configure the source and destination databases

  1. Click Create Task.

  2. Configure the source and destination databases with the following parameters.

Task settings

Parameter Description
Task Name DTS automatically generates a task name. Specify a descriptive name to identify the task. The name does not need to be unique.

Source database

Parameter Description
Select Existing Connection Optional. Selecting an existing database auto-populates the connection parameters. If no DMS database instance is registered, skip this option.
Database Type Select MariaDB.
Access Method Select Alibaba Cloud Instance.
Instance Region The region of the source RDS MariaDB TX instance.
Replicate Data Across Alibaba Cloud Accounts Whether to synchronize across Alibaba Cloud accounts. In this example, select No.
Instance ID The ID of the source RDS MariaDB TX instance.
Database Account The database account of the source instance. For required permissions, see Permissions required for database accounts.
Database Password The password for the database account.
Encryption Whether to encrypt the connection to the source database. In this example, select Non-encrypted.

Destination database

Parameter Description
Select Existing Connection Optional. Selecting an existing database auto-populates the connection parameters. If no DMS database instance is registered, skip this option.
Database Type Select MySQL.
Access Method Select Alibaba Cloud Instance.
Instance Region The region of the destination RDS MySQL instance.
Replicate Data Across Alibaba Cloud Accounts Whether to synchronize across Alibaba Cloud accounts. In this example, select No.
RDS Instance ID The ID of the destination RDS MySQL instance.
Database Account The database account of the destination instance. For required permissions, see Permissions required for database accounts.
Database Password The password for the database account.
Encryption Whether to encrypt the connection. Select Non-encrypted or SSL-encrypted based on your requirements. To use SSL-encrypted, enable SSL encryption on the RDS MySQL instance first.
  1. Click Test Connectivity and Proceed.

Warning

DTS automatically adds the CIDR blocks of DTS servers to the whitelist of Alibaba Cloud database instances (such as ApsaraDB RDS for MySQL or ApsaraDB for MongoDB instances). For self-managed databases hosted on Elastic Compute Service (ECS) instances, DTS automatically adds the CIDR blocks to the security group rules of the ECS instance. Make sure the ECS instance can access the database. If the database is deployed on multiple ECS instances, manually add the CIDR blocks of DTS servers to the security group rules of each ECS instance. For self-managed databases in a data center or from a third-party cloud provider, manually add the CIDR blocks to the database whitelist. CIDR blocks of DTS servers. Adding CIDR blocks of DTS servers to the whitelist, instance security group rules, or ECS security group rules introduces security risks. Before using DTS, take preventive measures, including but not limited to: strengthening username and password security, limiting exposed ports, authenticating API calls, regularly reviewing the whitelist or ECS security group rules and removing unauthorized CIDR blocks, or connecting the database to DTS through Express Connect, VPN Gateway, or Smart Access Gateway.

Step 3: Select objects and configure synchronization settings

Configure the synchronization objects and advanced settings.

Parameter Description
Synchronization Types By default, Incremental Data Synchronization is selected. Also select Schema Synchronization and Full Data Synchronization. After the precheck, DTS synchronizes historical data from source to destination as the basis for incremental synchronization.
Method to Migrate Triggers in Source Database The method to synchronize triggers. Skip this if no triggers need synchronization. Synchronize or migrate triggers from the source database. Available only when Schema Synchronization is selected.
Processing Mode of Conflicting Tables How to handle tables with identical names in the source and destination. Precheck and Report Errors: Reports an error for duplicate table names. Resolve conflicts by using object name mapping to rename destination tables. Ignore Errors and Proceed: Skips duplicate name checks. During full synchronization, records with duplicate primary keys are skipped. During incremental synchronization, such records overwrite existing ones. Schema mismatches may cause initialization failure or partial synchronization.
Source Objects Select objects from the Source Objects section and click the right-arrow icon to add them to Selected Objects. You can select databases, tables, or columns.
Selected Objects To rename an object in the destination instance, right-click it in the Selected Objects section. Map the name of a single object. To batch rename, click Batch Edit in the upper-right corner of the Selected Objects section. Map multiple object names at a time. To select specific SQL operations for a database or table, right-click the object in the Selected Objects section. Supported SQL operations for incremental synchronization. To filter data with WHERE conditions, right-click a table in the Selected Objects section. Specify filter conditions. Renaming objects with name mapping may cause dependent objects to fail synchronization.

Step 4: Configure advanced settings

Click Next: Advanced Settings and configure the following parameters.

Parameter Description
Dedicated Cluster for Task Scheduling By default, DTS schedules tasks to a shared cluster. To improve stability, purchase a DTS dedicated cluster.
Monitoring and Alerting Whether to configure alerting for the task. If the task fails or synchronization latency exceeds the threshold, alert contacts receive notifications. Select No to disable alerting, or Yes to configure thresholds and notifications. Configure monitoring and alerting when you create a DTS task.
Retry Time for Failed Connections The retry duration when the source or destination database fails to connect. Valid values: 10 to 1440 minutes. Default: 720 (must be greater than 30). If DTS reconnects within the specified duration, the task resumes; otherwise, the task fails. When multiple tasks share the same source or destination, the shortest retry duration takes precedence. DTS charges during retry. Release the instance promptly after the source and destination are released.
Retry Time for Other Issues The retry duration when DDL or DML operations fail. Valid values: 1 to 1440 minutes. Default: 10 (must be greater than 10). If the operations succeed within this duration, the task resumes; otherwise, the task fails. Must be smaller than Retry Time for Failed Connections.
Enable Throttling for Full Data Synchronization Throttle full data synchronization to reduce the load on database servers. Configure the Queries per second (QPS) to the source database, RPS of Full Data Migration, and Data migration speed for full migration (MB/s) parameters. This parameter is available only when Full Data Synchronization is selected.
Enable Throttling for Incremental Data Synchronization Whether to throttle incremental data synchronization. Configure the RPS of Incremental Data Synchronization and Data synchronization speed for incremental synchronization (MB/s) parameters to reduce the load on the destination database server.
Environment Tag The environment tag to identify the DTS instance. Select a tag based on your requirements.
Configure ETL Whether to enable ETL for data processing. Select Yes to enter data processing statements. Configure ETL in a data migration or data synchronization task. Select No to skip ETL. What is ETL?

Step 5: Run the precheck and purchase the instance

  1. Click Next: Save Task Settings and Precheck.

    To view the parameters for the relevant API operation, hover over Next: Save Task Settings and Precheck and click Preview OpenAPI parameters.
  2. Wait for the precheck to complete. DTS performs a precheck before the synchronization task can start.

    • If the precheck fails, click View Details next to each failed item. Analyze the causes based on the check results and fix the issues. Then run the precheck again.

    • If an alert is triggered for an item:

      • If the alert cannot be ignored, click View Details and troubleshoot the issue. Then run the precheck again.

      • If the alert can be ignored, click Confirm Alert Details. In the View Details dialog box, click Ignore, then click OK. Click Precheck Again to run the precheck again. Ignoring alerts may cause data inconsistency and potential risks.

  3. Wait until the Success Rate reaches 100%. Then click Next: Purchase Instance.

  4. On the purchase page, configure the following parameters.

    New Instance Class

    Parameter Description
    Billing Method Subscription: Pay upfront. More cost-effective for long-term use. Pay-as-you-go: Billed hourly. Suitable for short-term use. Release the instance when no longer needed. Pay-as-you-go Serverless: Billed based on actual usage with automatic scaling.
    Resource Group Settings The resource group for the data synchronization instance. Default value: default resource group. What is Resource Management?
    Instance Class DTS provides instance classes with different synchronization speeds. Select a class based on your requirements. Instance classes of data synchronization instances.
    Subscription Duration If you select the Subscription billing method, specify the subscription duration: 1 to 9 months, or 1, 2, 3, or 5 years.

    DTS Insight

    Parameter Description
    DTS Insight Whether to enable DTS Insight for intelligent diagnostics. Select an option based on your requirements.
  5. Read and select Data Transmission Service (Pay-as-you-go) Service Terms.

  6. Click Buy and Start to save the task and start it immediately, or click Buy and Save to save the task without starting it. In the dialog box that appears, click OK.

The task appears in the task list where you can monitor its progress.