__tencentdb__
in the source database to record the data comparison information during the sync task.__tencentdb__
system database in the source database will not be deleted after the sync 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.GRANT RELOAD,LOCK TABLES,REPLICATION CLIENT,REPLICATION SLAVE,SHOW DATABASES,SHOW VIEW,PROCESS,SELECT ON *.* TO 'account'@'%' IDENTIFIED BY ' password ';//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.htmlGRANT ALL PRIVILEGES ON `__tencentdb__`.* TO 'account'@'%';FLUSH PRIVILEGES;
DEFINER
( [DEFINER = user1]) in the source database, matches the synchronization account user2. If they do not match, after synchronization, 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 synchronization account user2 ([DEFINER = synchronization account user2]). If the view definitions in the source database are overly complex, the synchronization task may fail.STATEMENT
format, synchronization will fail.ALTER VIEW
statements are not supported. Such statements will be skipped and not synchronized.Operation Type | SQL Statements |
DML | INSERT,UPDATE,DELETE |
DDL | DROP DATABASE,ALTER DATABASE,CREATE TABLE,ALTER TABLE,DROP TABLE,TRUNCATE TABLE,RENAEM TABLE,CREATE VIEW,DROP VIEW,CREATE INDEX,DROP INDEX Note: DDL statements involving partitions cannot be synced. |
Parameter | Description |
Billing Mode | Monthly subscription and pay-as-you-go billing are supported. |
Source Instance Type | Select MySQL, which cannot be changed once configured. |
Source Instance Region | Select the source instance region, which cannot be changed once configured. |
Target Instance Type | Select MySQL, which cannot be changed once configured. |
Target Instance Region | Select the target instance region, which cannot be changed once configured. |
Specification | Select a specification based on your business needs. The higher the specification, the higher the performance. |
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 starts immediately after passing the pre-checks. Scheduled execution: Set a specific start time for the task. The task does not start immediately after passing the pre-checks 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 CVM), Tencent Cloud database instances, and lightweight databases, select Normal. For third-party cloud vendor 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 Readiness Overview. For source databases hosted on self-built IDC environments or other cloud providers, the access types include Public Network / Direct Connect / 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 Access: 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-Build on CVM as the access type. If the source database is a Tencent Cloud database instance, select 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 by specifying 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. Instance ID: 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 Secure Socket Layer (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. |
Category | Parameter | Description |
Data Initialization Option | Initialization Type | Structure initialization: Table structures in the source instance will be initialized into the target instance before the sync task runs. Full data initialization: Data in the source instance will be initialized into the target database before the sync task runs. In scenarios where only full data initialization is selected, users need to create the table structure in the target database in advance. Both options are selected by default, and you can deselect them as needed. |
| If Target Already Exists | Precheck and report error: If a table with the same name exists in both the source and target databases, an error will be reported, and the task will stop. Ignore and execute: Full and incremental data will be directly added to tables in the target instance. |
Data Sync Option | Conflict Resolution Method | Report: If a primary key conflict is found during data sync, an error will be reported, and the data sync task will be paused. Ignore: If a primary key conflict is found during data sync, the primary key record in the target database will be retained. Overwrite: If a primary key conflict is found during data sync, the primary key record in the source database will overwrite that in the target database. |
| SQL Type | Supported operations include INSERT, UPDATE, DELETE, and DDL. If you select Custom DDL, you can select different DDL statement sync policies as needed. |
Sync Object Option | Database and Table Objects of Source Instance | Select the objects to be synced. You can select basic databases, tables, views, procedures, and functions.The sync of advanced objects is a one-time operation: only advanced objects already in the source database before the task start can be synced, while those added to the source database after the task start will not be synced to the target database. For more information, see Syncing Advanced Object. |
| 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. After selecting individual table objects one by one, you can configure Where conditions. For details, see Where Condition Filter. When advanced objects are selected for sync, we recommend you not rename databases/tables; otherwise, sync of the advanced objects may fail. |
| Whether to synchronize online DDL temporary tables | If tools such as gh-ost or pt-osc are used to perform Online DDL operations on the source database tables, DTS supports synchronizing the temporary tables generated by these Online DDL changes to the target database. If gh-ost is selected, DTS will synchronize the temporary table names ( _table name_ghc , _table name_gho , and _table name_del ) generated by the gh-ost tool to the target database.If pt-osc is selected, DTS will synchronize the temporary table names ( _table name_new and _table name_old ) generated by the pt-osc tool to the target database. |
Parameter | Description |
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 Throttling. |