All Products
Search
Document Center

Data Transmission Service:Migrate data from an ApsaraDB RDS for MariaDB TX instance to an ApsaraDB RDS for MySQL instance

Last Updated:Mar 28, 2026

Use Data Transmission Service (DTS) to migrate data from an ApsaraDB RDS for MariaDB TX instance to an ApsaraDB RDS for MySQL instance. DTS supports schema migration, full data migration, and incremental data migration, allowing you to migrate data with minimal downtime.

Prerequisites

Before you begin, make sure that you have:

Billing

Migration typeTask configuration feeData transfer fee
Schema migration and full data migrationFreeFree
Incremental data migrationChargedSee Billing overview

Permissions required for database accounts

DatabaseSchema migrationFull data migrationIncremental data migration
Source ApsaraDB RDS for MariaDB TX instanceSELECT on the objects to be migratedRead and write on the objects to be migratedRead and write on the objects to be migrated
Destination ApsaraDB RDS for MySQL instanceRead and write on the destination databaseRead and write on the destination databaseRead and write on the destination database

For instructions on creating accounts and granting the required permissions, see:

SQL operations supported for incremental migration

TypeSupported statements
DMLINSERT, UPDATE, DELETE
DDLALTER TABLE, ALTER VIEW, CREATE FUNCTION, CREATE INDEX, CREATE PROCEDURE, CREATE TABLE, CREATE VIEW, DROP INDEX, DROP TABLE, RENAME TABLE, TRUNCATE TABLE
Important

RENAME TABLE operations can cause data inconsistency. If you rename a table during migration and the table is selected as a migration object (not the database), data from that table will not migrate. To avoid this, select the database as the migration object instead of the individual table. Make sure both the original and renamed table belong to databases included in the migration objects.

Limitations

Foreign key behavior

DTS migrates foreign keys from the source database to the destination database during schema migration. During full data migration and incremental data migration, DTS temporarily disables foreign key constraint checks and cascade operations at the session level. If you perform cascade or delete operations on the source database during migration, data inconsistency may occur.

Source database requirements

RequirementDetails
BandwidthThe source server must have sufficient outbound bandwidth. Insufficient bandwidth reduces migration speed.
Table constraintsTables must have PRIMARY KEY or UNIQUE constraints, and all fields must be unique. Without these constraints, the destination database may contain duplicate records.
Table count limitIf you select tables as migration objects and need to rename them in the destination database, a single migration task supports up to 1,000 tables. For more than 1,000 tables, split the task or select the entire database as the migration object.
DDL operationsDo not perform DDL operations on the source database during schema migration or full data migration.
Write operationsIf you run only full data migration (without incremental migration), do not write to the source database during migration. To ensure data consistency, select schema migration, full data migration, and incremental data migration together.

Binlog requirements for incremental data migration

To enable incremental data migration, configure the following parameters on the source instance:

ParameterRequired valueWhy
Binary loggingEnabledDTS reads changes from binary logs for incremental migration.
binlog_formatrowRow-based format captures full row-level changes required by DTS.
binlog_row_imagefullFull image captures before and after values for each row change.

Set the binary log retention period based on your migration type:

  • Incremental migration only: Retain binary logs for more than 24 hours.

  • Full data migration + incremental data migration: Retain binary logs for at least 7 days. After full data migration completes, you can reduce the retention period to more than 24 hours.

If DTS cannot retrieve the required binary logs, the task fails or data loss may occur. Setting retention periods below these minimums voids the DTS service level agreement (SLA).

Other limitations

  • Timing: Evaluate the impact on source and destination database performance before starting. Run migrations during off-peak hours — full data migration consumes read and write resources on both instances.

  • Tablespace size: Concurrent INSERT operations during full data migration cause fragmentation in destination tables. After migration, the destination tablespace is typically larger than the source.

  • FLOAT and DOUBLE precision: DTS retrieves FLOAT and DOUBLE column values using ROUND(COLUMN,PRECISION). If no precision is specified, DTS uses 38 digits for FLOAT and 308 digits for DOUBLE. Verify that these defaults meet your requirements.

  • Failed task resumption: DTS retries failed migration tasks for up to 7 days. Before switching workloads to the destination database, stop or release any failed tasks. Alternatively, run the REVOKE statement to revoke write permissions from the DTS accounts on the destination database. Otherwise, a resumed failed task may overwrite data in the destination database.

  • DDL failures in destination: If DDL statements fail in the destination database, the DTS task continues running. Check the task logs to view failed DDL statements. For more information, see View task logs.

  • Column name case sensitivity: MySQL column names are case-insensitive. If the source database has columns whose names differ only in capitalization, the migration result may not match expectations.

  • Post-migration verification: After migration completes, run analyze table <table_name> to verify that data was written to the destination table. In some high availability (HA) switchover scenarios, data may be written only to memory in the source instance, resulting in data loss.

Pre-migration checklist

Before starting the migration task, verify the following items. Skipping any item may cause the task to fail or data to be inconsistent.

#ItemHow to verify
1Destination RDS for MySQL instance is created and has enough storage spaceCheck instance status and storage in the RDS console
2Database accounts have the required permissionsRun SHOW GRANTS FOR '<dts_user>'@'%'; on each database
3Source instance has sufficient outbound bandwidthCheck bandwidth usage in the monitoring console
4Tables to be migrated have PRIMARY KEY or UNIQUE constraintsRun SHOW CREATE TABLE <table_name>; to verify
5Binary logging is enabled (incremental migration only)Run SHOW VARIABLES LIKE 'log_bin'; — value must be ON
6binlog_format = row (incremental migration only)Run SHOW VARIABLES LIKE 'binlog_format';
7binlog_row_image = full (incremental migration only)Run SHOW VARIABLES LIKE 'binlog_row_image';
8Binary log retention period meets requirements (incremental migration only)Check the RDS parameter group settings
9No DDL operations are planned during schema/full data migrationCoordinate with your team
10Migration is scheduled during off-peak hoursReview application traffic patterns

Create a migration task

Step 1: Go to the Data Migration Tasks page

  1. Log on to the Data Management (DMS) console.

  2. In the top navigation bar, click DTS.

  3. In the left-side navigation pane, choose DTS (DTS) > Data Migration.

Note

Alternatively, go directly to the Data Migration Tasks page of the new DTS console. Console layout and available operations may vary. For more information, see Simple mode and Customize the layout and style of the DMS console.

Step 2: Select the region

From the drop-down list next to Data Migration Tasks, select the region where the migration instance resides.

Note

In the new DTS console, select the region in the upper-left corner.

Step 3: Configure source and destination databases

Click Create Task. On the Create Task page, configure the source and destination databases.

Warning

Read the limits displayed at the top of the page before proceeding. Skipping this step may cause the task to fail or result in data inconsistency.

Source database

ParameterDescription
Select an existing DMS database instance (optional)Select an existing instance to auto-populate the connection parameters, or leave blank to configure manually.
Database TypeSelect MariaDB.
Access MethodSelect Alibaba Cloud Instance.
Instance RegionSelect the region where the source ApsaraDB RDS for MariaDB TX instance resides.
Replicate Data Across Alibaba Cloud AccountsSelect No for same-account migration.
Instance IDSelect or enter the ID of the source ApsaraDB RDS for MariaDB TX instance.
Database AccountEnter the database account for the source instance. See Permissions required for database accounts.
Database PasswordEnter the password for the database account.
EncryptionSelect Non-encrypted for this example.

Destination database

ParameterDescription
Select an existing DMS database instance (optional)Select an existing instance to auto-populate the connection parameters, or leave blank to configure manually.
Database TypeSelect MySQL.
Access MethodSelect Alibaba Cloud Instance.
Instance RegionSelect the region where the destination ApsaraDB RDS for MySQL instance resides.
Replicate Data Across Alibaba Cloud AccountsSelect No for same-account migration.
RDS Instance IDSelect or enter the ID of the destination ApsaraDB RDS for MySQL instance.
Database AccountEnter the database account for the destination instance. See Permissions required for database accounts.
Database PasswordEnter the password for the database account.
EncryptionSelect Non-encrypted or SSL-encrypted. If you select SSL-encrypted, enable SSL encryption on the destination instance first. See Configure the SSL encryption feature.

Step 4: Test connectivity

Click Test Connectivity and Proceed.

DTS automatically adds its server CIDR blocks to the IP address whitelist of Alibaba Cloud database instances, and to the security group rules of Elastic Compute Service (ECS) instances hosting self-managed databases. For self-managed databases on multiple ECS instances or on-premises databases, manually add the DTS server CIDR blocks. See Add the CIDR blocks of DTS servers to the security settings of on-premises databases.

Warning

Adding public CIDR blocks to IP address whitelists or security group rules introduces security risks. Before using DTS, take preventive measures including: strengthening account passwords, limiting exposed ports, authenticating API calls, and regularly auditing IP whitelists and security group rules. Where possible, connect to DTS using Express Connect, VPN Gateway, or Smart Access Gateway instead of public network access.

Step 5: Configure migration objects

Configure the migration types and select objects to migrate.

ParameterDescription
Migration Types

Select the migration types based on your needs:

- Full migration only: Select Schema Migration and Full Data Migration.

- Migration with service continuity: Select Schema Migration, Full Data Migration, and Incremental Data Migration. If you do not select Incremental Data Migration, do not write to the source database during migration.

Method to Migrate Triggers in Source DatabaseSelect the trigger migration method based on your requirements. This parameter is available only when both Schema Migration and Incremental Data Migration are selected. See Synchronize or migrate triggers from the source database.
Processing Mode of Conflicting Tables

Precheck and Report Errors (default): DTS checks for tables with identical names in both databases. The task fails the precheck if duplicates exist. Use the object name mapping feature to resolve name conflicts. See Map object names.

Ignore Errors and Proceed: Skips the duplicate name check. If source and destination tables share the same schema, DTS skips records with matching primary keys. If schemas differ, only specific columns migrate or the task fails.

Source ObjectsSelect objects to migrate from the Source Objects section, then click the arrow icon to add them to Selected Objects. You can select columns, tables, or databases. Selecting tables or columns excludes views, triggers, and stored procedures from migration.
Selected ObjectsTo rename a single object, right-click it in Selected Objects. See Map the name of a single object. To rename multiple objects at once, click Batch Edit. See Map multiple object names at a time. To filter data with WHERE conditions, right-click an object and specify the conditions. See Set filter conditions. To specify DML or DDL operations to migrate for an object, right-click the object and select the operations.
Note

Renaming an object with the object name mapping feature may cause other objects that depend on it to fail migration.

Step 6: Configure advanced settings

Click Next: Advanced Settings.

ParameterDescription
Select the dedicated cluster used to schedule the taskBy default, DTS uses the shared cluster. To use a dedicated cluster, purchase and specify one. See What is a DTS dedicated cluster.
Set AlertsNo: No alerting. Yes: Alerts are sent when the task fails or migration latency exceeds the threshold. Specify the alert threshold and contacts. See Configure monitoring and alerting.
Retry Time for Failed ConnectionsThe retry window for connection failures. Valid values: 10–1,440 minutes. Default: 720 minutes. Set to more than 30 minutes. If DTS reconnects within the retry window, the task resumes. Otherwise, the task fails. Multiple tasks sharing the same source or destination database use the most recently configured retry time.
The wait time before a retry when other issues occur in the source and destination databasesThe retry window for non-connection issues such as failed DML or DDL operations. Valid values: 1–1,440 minutes. Default: 10 minutes. Set to more than 10 minutes. This value must be less than the Retry Time for Failed Connections value.
Enable Throttling for Full Data MigrationLimits the QPS to the source database, RPS of full data migration, and migration speed (MB/s) to reduce load on the destination. Displayed only when Full Data Migration is selected.
Enable Throttling for Incremental Data MigrationLimits the RPS and migration speed (MB/s) for incremental migration. Displayed only when Incremental Data Migration is selected.
Environment TagAn optional tag to identify the DTS instance.
Configure ETLYes: Opens a code editor to enter data processing statements. See Configure ETL in a data migration or synchronization task and What is ETL?. No: Skips ETL configuration.

Step 7: Run the precheck

Click Next: Save Task Settings and Precheck.

Note

To preview the API parameters for this task configuration, hover over Next: Save Task Settings and Precheck and click Preview OpenAPI parameters.

DTS runs a precheck before the migration task can start. If items fail:

  • Click View Details next to the failed item, fix the issue based on the error message, then click Precheck Again.

  • For alert items: if the item can be ignored, click Confirm Alert Details > Ignore > OK, then click Precheck Again. Ignoring alerts may cause data inconsistency.

Step 8: Purchase a migration instance

Wait until the precheck success rate reaches 100%, then click Next: Purchase Instance.

On the Purchase Instance page, configure the following:

SectionParameterDescription
New Instance ClassResource GroupThe resource group for the migration instance. Default: default resource group. See What is Resource Management?
Instance ClassSelect the instance class based on your required migration speed. See Specifications of data migration instances.

Read and accept the Data Transmission Service (Pay-as-you-go) Service Terms by selecting the check box, then click Buy and Start.

The migration task starts and appears in the task list. Monitor the task progress from the task list.

What's next

After the migration task completes, verify that data was written correctly by running analyze table <table_name> on the destination instance. You can then switch your workloads to the destination ApsaraDB RDS for MySQL instance.