__tencentdb__
in the source database to record the data comparison information during the migration task.__tencentdb__
system database in the source database will not be deleted after the migration task ends.__tencentdb__
system database uses a single-threaded connection wait mechanism and occupies a very small space, about 0.01%–0.1% of the storage space of the source database; for example, if the source database is 50 GB, __tencentdb__
will be about 5–50 MB. Therefore, it has almost no impact on the performance of the source database and will not preempt resources.CREATE USER 'migration_account'@'%' IDENTIFIED BY 'migration password';GRANT RELOAD, LOCK TABLES, REPLICATION CLIENT, REPLICATION SLAVE, SHOW DATABASES, SHOW VIEW, PROCESS ON *.* TO 'migration_account'@'%';//If the Source Database is Alibaba Cloud Database, SHOW DATABASES authorization is not required, but at least one Non-system Database needs to be created. Otherwise, the Pre-validation Task will fail. Authorization is required for other non-Alibaba Cloud Database scenarios. For Alibaba Cloud Database authorization, please refer to https://help.aliyun.com/document_detail/96101.html//If you choose to migrate triggers and events, TRIGGER and EVENT permissions are requiredGRANT ALL PRIVILEGES ON `__tencentdb__`.* TO 'migration_account'@'%';GRANT SELECT ON *.* TO 'migration_account';
CREATE USER 'migration_account'@'%' IDENTIFIED BY 'migration password';GRANT RELOAD, LOCK TABLES, REPLICATION CLIENT, REPLICATION SLAVE, SHOW DATABASES, SHOW VIEW, PROCESS ON *.* TO 'migration_account'@'%';//If the Source Database is Alibaba Cloud Database, SHOW DATABASES authorization is not required, but at least one Non-system Database needs to be created. Otherwise, the Pre-validation Task will fail. Authorization is required for other non-Alibaba Cloud Database scenarios. For Alibaba Cloud Database authorization, please refer to https://help.aliyun.com/document_detail/96101.html//If you choose to migrate triggers and events, you need to grant both TRIGGER and EVENT permissionsGRANT ALL PRIVILEGES ON `__tencentdb__`.* TO 'migration_account'@'%';GRANT SELECT ON `mysql`.* TO 'migration_account'@'%';GRANT SELECT ON libraries to be migrated.* TO 'migration_account';
information_schema
, sys
, performance_schema
, __cdb_recycle_bin__
, __recycle_bin__
, __tencentdb__
, and mysql
can not be migrated.DEFINER
([DEFINER = user1]) in the source database, matches the migration account user2. If they do not match, after migration, DTS modifies the SQL SECURITY
attribute of user1 in the target database from DEFINER
to INVOKER
([INVOKER = user1]), and sets the DEFINER
in the target database to the migration account user2 ([DEFINER = migration account user2]). If the view definitions in the source database are too complex, the migration task may fail.STATEMENT
format, migration will fail.ALTER VIEW
statements are not supported. Such statements will be skipped and not migrated.Operation Type | Supported SQL Operation |
DML | INSERT, UPDATE, DELETE, REPLACE |
DDL | TABLE: CREATE TABLE, ALTER TABLE, DROP TABLE, TRUNCATE TABLE, RENAME TABLE VIEW: CREATE VIEW, DROP VIEW INDEX: CREATE INDEX, DROP INDEX DATABASE: CREATE DATABASE, ALTER DATABASE, DROP DATABASE CREATE TABLE table name AS SELECT is not supported. |
Configuration Item | Description |
Creation Mode | Select Create task. |
Billing Mode | Only the pay-as-you-go billing mode is supported. After the purchase is completed, fees will be charged only in the incremental migration stage but not task configuration and full migration stages. However, due to Tencent Cloud's unified requirements for pay-as-you-go billing, the fees for one hour's usage will be frozen after the purchase. For detailed billing rules, see Billing Overview. |
Source Instance Type | Select the source database type, which cannot be changed after purchase. Here, select MySQL. |
Source Instance Region | This refers to the source region of the DTS service. If the source database is TencentDB, select its region here. If the source database is self-built or in another cloud, select the region closest to it, so that DTS can choose the optimal migration path to reduce the migration time. |
Target Instance Type | Select the target database type, which cannot be changed after purchase. Here, select MySQL. |
Target Instance Region | Select the target database region. |
Specification | Select the specification of the migration link based on your business conditions. For the performance and billing details of different specifications, see Billing Overview. |
Quantity | You can purchase up to 10 migration tasks at a time. |
Parameter | Description |
Task Name | DTS automatically generates a task name. It is recommended to change it to a meaningful name for easier task identification. |
Running Mode | Immediate execution: The task is started immediately after passing the pre-verifications. Scheduled execution: Set a specific start time for the task. The task does not start immediately after passing the pre-verifications but waits until the scheduled time. |
Automatic Retry | Once it is enabled, if a synchronization task is temporarily interrupted due to network issues or similar causes, DTS will automatically retry and resume the task within the specified time frame without requiring manual intervention. The supported range is 5 to 720 minutes. |
Parameter | Description |
Source Instance Type | The type of source instance selected at the time of purchase, which cannot be modified. |
Source Instance Region | The region of the source instance selected at the time of purchase, which cannot be modified. |
Service Provider | For self-built databases (including those on CVMs), Tencent Cloud database instances, and lightweight databases, select Others. For third-party cloud provider databases, select the corresponding service provider. |
Access Type | Choose based on the deployment setup of the source database. Different deployment scenarios require specific network configurations. For details, see Network Preparation Work Overview. For source databases hosted on self-built IDC environments or other cloud providers, the access types include Public network/DC/VPN access/CCN. Public Network: The source database can be accessed via a public IP address. Direct Connect: The source database can connect to Tencent Cloud VPC using DC. VPN Access: The source database can connect to Tencent Cloud VPC using VPN Connections. CCN: The source database can connect to Tencent Cloud VPC using CCN. VPC: Both the source data and target database are deployed on Tencent Cloud and within a VPC. If you need to use the VPC access type, submit a ticket for application. If the source database is self-built on a CVM, select Self-built on CVM as the access type. If the source database is a Tencent Cloud database instance, select Cloud Database as the access type. |
Public Network | When Public Network is selected as the Access Type, configure the following parameters: Host Address: The IP address or domain name of the source database. Port: The port used by the source database. |
Self-Build on CVM | When Self-Build on CVM is selected as the Access Type, configure the following parameters: CVM Instance: The instance ID of the CVM. Port: The port used by the source database. |
Direct Connect | When Direct Connect is selected as the Access Type, configure the following parameters: VPC-Based Direct Connect Gateway: Only VPC Direct Connect Gateway is supported for DC. Confirm the network type associated with the gateway. VPC: Select the VPC and subnet. Host Address: The IP address of the source database. Port: The port used by the source database. |
VPN Access | When VPN Access is selected as the Access Type, configure the following parameters: VPN gateway: Select the VPN gateway based on its ID. VPC: Select the VPC and subnet associated with the VPN gateway. Host Address: The IP address of the source database. Port: The port used by the source database. |
Database | When Database is selected as the Access Type, configure the following parameters: Cross-/Intra-Account Intra-account: The source and target database instances belong to the same Tencent Cloud root account. Cross-account: The source and target database instances belong to different Tencent Cloud root accounts. For cross-account operations, see Cloud Database Cross-Account Instance Synchronization. Database Instance: The instance ID of the source database. |
CCN | When CCN is selected as the Access Type, configure the following parameters: CCN access supports both same-account and cross-account configurations. Due to the complexity of network configuration, see Migrate Self-built Database to Tencent Cloud Database via CCN for detailed guidance. Host Network Environment: Select based on the actual scenario. For example, select Tencent Cloud if the source database is a Tencent Cloud database instance, Self-built IDC if it is a self-built IDC database, or the corresponding network for databases from other cloud providers. Host Address: The host IP address of the source database. Port: The port used by the source database. CCN Instance Account Type My account: The CCN resources and target database belong to the same Tencent Cloud root account. Other account: The CCN resources and target database belong to different Tencent Cloud root accounts. VPC-Based CCN Instance: Name of the CCN instance. CCN-associated VPC and subnet: The CCN-associated VPC refers to the VPC connected to the synchronization linkage within the CCN. Select a VPC from all the VPCs associated with the CCN, excluding the VPC of the source database. Region of the VPC: The region of the VPC used for connection should match the region of the source database selected during task purchase. If there is a mismatch, DTS will automatically update the source database region to align with the VPC region. |
Account/Password | Account/Password: The account and password of the source database. |
Connection Method | Currently, if users want to experience the SSL secure connection feature, submit a ticket for application. SSL secure connection refers to encrypting the transmission linkage between DTS and the database using SSL. Enabling SSL secure connection may increase the connection response time of the database. Generally, Tencent Cloud’s private network linkage is relatively secure, and enabling SSL secure connection is not necessary. However, for scenarios using public network, DC, or other transmission methods where higher data security is required, enabling SSL secure connection is recommended. Ensure that SSL encryption is enabled in the database before selecting SSL secure connection. |
Configuration Item | Description |
Migration Type | Select an option based on your scenario. Structural migration: Structured data such as databases and tables in the database will be migrated. Full migration: The database/table structure and data of the entire database will be migrated. The migrated data will only be existing content of the source database when the task is initiated but not include the incremental data written to the source database after the task is initiated. Full + Incremental migration: The database/table structure and data of the entire database will be migrated. The migrated data will include the existing content of the source database when the task is initiated as well as the incremental data written to the source database after the task is initiated. If there are data writes to the source database during migration, and you want to smoothly migrate the data in a non-stop manner, select this option. |
Data Consistency Check | If Full + Incremental migration is selected, you can perform data consistency check to carefully compare the data in the source and target databases after migration. If Full check is selected, when the migration task enters the "incremental sync" step, the time lag between them is 0 seconds, and the data gap between the target and the source databases is 0 MB, DTS will automatically trigger a data consistency check task. If Full check is not selected, you can manually trigger a check task when the task enters the "incremental sync" step. For more information, see Creating Data Consistency Check Task. |
Migration Object | Entire instance: Migrate the entire database instance excluding the system databases such as information_schema , mysql , performance_schema , and sys .Specified objects: Migrate specified objects. |
Advanced Migration Object | Procedures, functions, triggers, and events can be migrated. The migration of advanced objects is a one-time operation: only advanced objects already in the source database before the task start can be migrated, while those added to the source database after the task start will not be synced to the target database. Procedures and functions will be migrated during source database export. If there are no incremental migration tasks, triggers and events will be migrated when the task stops; otherwise, they will be migrated after you click Done, in which case the transition will take a slightly longer time. |
Selected Object | Database/Table mapping (renaming) is supported. Hover over a database or table name, click the displayed Edit icon, and enter a new name in the pop-up window. We recommend you not rename tables when migrating advanced objects; otherwise, the migration may fail. |
Sync Online DDL Temp Table | If you perform an online DDL operation on tables in the source database with the gh-ost or pt-osc tool, DTS can migrate the temp tables generated by online DDL changes to the target database. If you select gh-ost, DTS will migrate the temp tables ( _table name_ghc , _table name_gho , and _table name_del ) generated by the gh-ost tool to the target database.If you select pt-osc, DTS will migrate the temp tables ( _table name_new and _table name_old ) generated by the pt-osc tool to the target database. |
Configuration Item | Description |
Migrate accounts | Check this feature if you need to migrate account information from the source database to the target database. For more details, see Account Migration. In migration linkages with AWS as the source, users who migrate accounts should manually install the auth_socket plugin in the target database. |
Limit transmission rate | This configuration is generally not required. It should only be adjusted when the database’s configuration is insufficient to handle the default DTS concurrent thread count and RPS. For more details, see Rate Limiting. |