This topic describes how to migrate data between PolarDB for MySQL clusters by using Data Transmission Service (DTS).
Prerequisites
- The source and destination PolarDB for MySQL clusters are created. For more information, see Purchase a pay-as-you-go cluster and Purchase a subscription cluster.
- The available storage space of the destination PolarDB for MySQL cluster is larger than the total size of the data in the source PolarDB for MySQL cluster.
Limits
Category | Description |
---|---|
Limits on the source database |
|
Other limits |
|
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 |
---|---|
Source PolarDB for MySQL cluster | The read permissions on the objects to be migrated |
Destination PolarDB for MySQL cluster | The read and write permissions on the objects to be migrated |