You can use Data Transmission Service (DTS) to migrate data from a PolarDB for MySQL cluster to a self-managed MySQL database or an ApsaraDB RDS for MySQL instance.
Supported destination databases
You can use DTS to migrate data from a PolarDB for MySQL cluster to the following types of MySQL databases. This topic uses an ApsaraDB RDS for MySQL instance as an example to describe how to configure a data migration task. You can also follow the procedure to configure data migration tasks for other types of MySQL databases.- ApsaraDB RDS for MySQL instance
- Self-managed databases:
- Self-managed database with a public IP address
- Self-managed database that is hosted on Elastic Compute Service (ECS)
- Self-managed database that is connected over Express Connect, VPN Gateway, or Smart Access Gateway
- Self-managed database that is connected over Database Gateway
Prerequisites
- The source PolarDB for MySQL cluster is created. For more information, see Purchase a pay-as-you-go cluster and Purchase a subscription cluster.
- The available storage space of the destination ApsaraDB RDS for MySQL instance is larger than the total size of the data in the source cluster.
Limits
Category | Description |
---|---|
Limits on the source database |
|
Precautions |
|
Special cases | If you migrate data to an ApsaraDB RDS for MySQL instance, DTS automatically creates a destination database in the ApsaraDB RDS for MySQL instance. However, if the name of the source database is invalid, you must manually create a database in the ApsaraDB RDS for MySQL instance before you configure the data migration task. For more information, see Create a database on an ApsaraDB RDS for MySQL instance. |
Migration types
- Schema migration
DTS migrates the schemas of the required objects from the source database to the destination database.
Note- DTS supports schema migration for the following types of objects: table, view, trigger, stored procedure, and function.
- During schema migration, DTS changes the value of the SECURITY attribute from DEFINER to INVOKER for views, stored procedures, and functions.
- DTS does not migrate user information. To call a view, stored procedure, or function of the destination database, you must grant the read and write permissions to INVOKER.
- Full data migration
DTS migrates historical data of the required objects from the source database to the destination database.
- Incremental data migration
After full data migration is completed, DTS migrates incremental data from the source database to the destination database. Incremental data migration allows you to ensure service continuity when you migrate data between self-managed databases.
SQL operations that can be migrated
Operation type | SQL statements |
---|---|
DML | INSERT, UPDATE, and DELETE |
DDL |
|
Permissions required for database accounts
Database | Required permissions |
---|---|
PolarDB for MySQL cluster | The read permissions on the objects to be migrated |
ApsaraDB RDS for MySQL instance | The read and write permissions on the objects to be migrated |
For more information about how to create and authorize a database account, see the following topics:
- PolarDB for MySQL cluster: Create a database account
- ApsaraDB RDS for MySQL instance: Create an account on an ApsaraDB RDS for MySQL instance and Modify the permissions of a standard account on an ApsaraDB RDS for MySQL instance