The data transmission service allows you to migrate data from other data sources to OceanBase Database or the other way around. This topic describes how to use the data transmission service to migrate data from a MySQL database to OceanBase Database.
Prerequisites
Before you start migrating data, make sure that the following conditions are met:
The data transmission service has the privilege to access cloud resources. For more information, see Grant privileges to roles for data transmission.
You have created data sources for the source and target. For more information, see Create a data source.
The source and target databases are both accessible over a network.
You have created dedicated database users for data migration in the source MySQL database and the target MySQL tenant of OceanBase Database and granted the corresponding privileges to the users. For more information, see Configure user privileges for a data source.
You have enabled binary logs for the source MySQL database. For more information, see Manage binary log files.
Procedure
Note
This topic describes how to use the data transmission service to migrate data from a MySQL database to OceanBase Database. For more information, see Data migration.
Log on to the ApsaraDB for OceanBase console and purchase a data migration task.
For more information, see Purchase a data migration task.
Choose Data Transmission > Data Migration. On the page that appears, click Configuration for the data migration task.

If you want to reference the configurations of an existing task, click Reference Configuration. For more information, see Reference the configuration of a data migration task.
On the Select Source and Target page, configure the parameters.
Parameter | Description |
Data Migration Task Name | We recommend that you set it to a combination of digits and letters. It must not contain any spaces and cannot exceed 64 characters in length. |
Source | The name of the source database. In this topic, the source data source is a MySQL database. If you have created a MySQL data source, select it from the drop-down list. Otherwise, select New Data Source from the drop-down list to create one in the dialog box on the right side. For more information about the parameters, see Create a MySQL data source. |
Target | The name of the target database. In this topic, the target data source is an OceanBase database. If you have created a data source for the MySQL tenant of OceanBase Database, select it from the drop-down list. Otherwise, select New Data Source from the drop-down list to create one in the dialog box on the right side. For more information about the parameters, see Create an OceanBase data source. Important If the target is an OceanBase database, Instance Type cannot be Self-Managed Database in VPC. |
Tag (Optional) | Click the field and select a target tag from the drop-down list. You can also click Manage Tags to create, modify, and delete tags. For more information, see Use tags to manage data migration tasks. |
Click Next. On the Select Migration Type page, select One-way Synchronization for Synchronous Topology.
Data migration tasks of some types support both one-way and two-way synchronization. This topic describes how to configure a one-way synchronization task. For task types that support two-way synchronization and how to configure such tasks, see Configure a two-way synchronization task.
Select a type for the current data migration task.
If you select One-way Synchronization for Synchronous Topology, the supported migration types are Schema Migration, Full Migration, Incremental Synchronization, Full Verification, and Reverse Increment.

Migration type | Description |
Migration type | Description |
Schema migration | After a schema migration task is started, the data transmission service migrates the definitions of database objects (such as tables, indexes, constraints, comments, and views) from the source database to the target database and automatically filters out temporary tables. In a task that migrates schemas from a MySQL database to a MySQL tenant of OceanBase Database, the database that does not exist in the target can be automatically created. |
Full migration | After a full migration task is started, the data transmission service migrates existing data from tables in the source database to corresponding tables in the target database. If you select Full Migration, we recommend that you use the ANALYZE statement to collect the statistics of the MySQL database before data migration. |
Incremental synchronization | After an incremental synchronization task is started, the data transmission service synchronizes changed data (data that is added, modified, or removed) from the source database to corresponding tables in the target database. Options for Incremental synchronization are DML synchronization and DDL synchronization. You can select operations as needed. For more information, see Configure DDL/DML synchronization. Incremental synchronization has the following limitations: If you select DDL Synchronization, when you perform a DDL operation that is not supported by the data transmission service in the source database, the data migration may be interrupted. If the DDL operation is ADD COLUMN, we recommend that you set the column to a NULL column. Otherwise, data migration may be interrupted.
|
Full verification | After the full migration and incremental synchronization tasks are completed, the data transmission service automatically initiates a full verification task to verify the tables in the source and target databases. If you select Full Verification, we recommend that you collect the statistics of the MySQL database and the MySQL tenant of OceanBase Database before full verification. If you selected Incremental Synchronization but did not select all DML operations in the DML Synchronization section, you cannot select Full Verification. The data transmission service supports full verification only for tables with a primary key or non-null unique key.
|
Reverse incremental synchronization | Data changes made in the target database after the business database switchover are synchronized to the source database in real time through reverse incremental synchronization. Generally, incremental synchronization configurations are reused for reverse incremental synchronization. You can also customize the configurations for reverse incremental synchronization as needed. |
Click Next. On the Select Migration Objects page, specify migration objects for the data migration task.
Select Specify Objects or Match Rules.
If you select Specify Objects, select the objects to be migrated on the left and click > to add them to the list on the right. You can select tables and views of one or more databases as the migration objects. The data transmission service allows you to import objects from text files, rename target objects, set row filters, view column information, and remove a single or all migration objects. To import migration objects, perform the following steps:
In the list on the right, click Import Objects in the upper-right corner.
In the dialog box that appears, click OK.
Important
This operation will overwrite previous selections. Proceed with caution.
In the Import Objects dialog box, import the objects to be migrated.
You can import CSV files to rename databases or tables and set row filtering conditions. For more information, see Download and import the settings of migration objects.
Click Validate.
After you import the migration objects, check their validity. Column field mapping is not supported at present.
After the validation is passed, click OK.
Select Match Rules. For more information, see Configure and modify matching rules.
Click Next. On the Migration Options page, configure the parameters.
Full migration
The following table describes the parameters for full migration, which are displayed only if you have selected One-way Synchronization and Full Migration in sequence on the Select Migration Type page.

Parameter | Description |
Read Concurrency Configuration | The concurrency for reading data from the source during full migration. The maximum value is 512. A high read concurrency may incur excessive stress on the source, affecting the business. |
Write Concurrency Configuration | The concurrency for writing data to the target during full migration. The maximum value is 512. A high write concurrency may incur excessive stress on the target, affecting the business. |
Full Migration Rate Limit | You can choose whether to limit the full migration rate as needed. If you choose to limit the full migration rate, you must specify the records per second (RPS) and bytes per second (BPS). The RPS specifies the maximum number of data rows migrated to the target per second during full migration, and the BPS specifies the maximum amount of data in bytes migrated to the target per second during full migration. Note The RPS and BPS values specified here are only for throttling. The actual full migration performance is subject to factors such as the settings of the source and target and the instance specifications. |
Processing Strategy When Target Table Has Records | Valid values are Ignore and Stop Migration. If you select Ignore, when the data to be inserted conflicts with existing data of a target table, the data transmission service logs the conflicting data while retaining the existing data. Important If you select Ignore, data is pulled in IN mode during full verification. In this case, verification is inapplicable if the target contains data that does not exist in the source, and the verification performance is downgraded. If you select Stop Migration and a target table contains records, an error prompting migration unsupported is reported during full migration. In this case, you must process the data in the target table before continuing with the migration. Important If you click Restore in the dialog box prompting the error, the data transmission service ignores this error and continues to migrate data. Proceed with caution.
|
Whether to Allow Post-indexing | Specifies whether to create indexes after the full migration is completed. Post-indexing can shorten the time required for full migration. For more information about the considerations on post-indexing, see the description below. Important This parameter is displayed only if you have selected both Schema Migration and Full Migration on the Select Migration Type page. Only non-unique key indexes can be created after the migration is completed. If the target OceanBase database returns the following error during index creation, the data transmission service ignores the error and determines that the index is successfully created, without creating it again.
If the target is an OceanBase database and you select Allow for this parameter, the following parameters need to be set: Single Index DDL Concurrency Configuration: the maximum number of concurrent DDL operations allowed for a single index. A larger value indicates higher resource consumption and faster data migration. Maximum concurrent index DDL quantity configuration: the maximum number of post-indexing DDL operations that the system can call at a time.
|
If post-indexing is allowed, we recommend that you use a CLI client to modify the following parameters for business tenants based on the hardware conditions of OceanBase Database and your current business traffic:
// Specify the limit on the file memory buffer size.
alter system set _temporary_file_io_area_size = '10' tenant = 'xxx';
// Disable throttling in OceanBase Database V4.x.
alter system set sys_bkgd_net_percentage = 100;
Incremental synchronization
The following parameters are displayed only if you have selected One-way Synchronization and Incremental Synchronization in sequence on the Select Migration Type page.

Parameter | Description |
Write Concurrency Configuration | The concurrency for writing data to the target during incremental synchronization. The maximum value is 512. A high write concurrency may incur excessive stress on the target, affecting the business. |
Incremental Synchronization Rate Limit | You can choose whether to limit the incremental synchronization rate as needed. If you choose to limit the incremental synchronization rate, you must specify the RPS and BPS. The RPS specifies the maximum number of data rows synchronized to the target per second during incremental synchronization, and the BPS specifies the maximum amount of data in bytes synchronized to the target per second during incremental synchronization. Note The RPS and BPS values specified here are only for throttling. The actual incremental synchronization performance is subject to factors such as the settings of the source and target and the instance specifications. |
Incremental Synchronization Start Timestamp | This parameter is not displayed if you have selected Full Migration on the Select Migration Type page. If you have selected Incremental Synchronization but not Full Migration, specify a point in time after which the data is to be synchronized. The default value is the current system time. For more information, see Set an incremental synchronization timestamp.
|
Reverse incremental synchronization
The following parameters are displayed only if you have selected One-way Synchronization and Reverse Increment in sequence on the Select Migration Type page. By default, incremental synchronization configurations are reused for reverse incremental synchronization.

You can choose not to reuse the incremental synchronization configurations and configure reverse incremental migration as needed.
Parameter | Description |
Write Concurrency Configuration | The concurrency for writing data to the source during reverse incremental synchronization. The maximum value is 512. A high concurrency may incur excessive stress on the source, affecting the business. |
Reverse Increment Rate Limit | You can choose whether to limit the reverse incremental synchronization rate as needed. If you choose to limit the reverse incremental synchronization, you must specify the RPS and BPS. The RPS specifies the maximum number of data rows synchronized to the source per second during reverse incremental synchronization, and the BPS specifies the maximum amount of data in bytes synchronized to the source per second during reverse incremental synchronization. Note The RPS and BPS values specified here are only for throttling. The actual reverse incremental synchronization performance is subject to factors such as the settings of the source and target and the instance specifications. |
Incremental Synchronization Start Timestamp | This parameter is not displayed if you have selected Full Migration on the Select Migration Type page. If you have selected Incremental synchronization but not Full Migration, the forward switchover start timestamp (if any) is used by default. This parameter cannot be modified.
|
Advanced parameters
This section is displayed only if the target is a MySQL tenant of OceanBase Database V4.3.0 or later and you have selected Schema Migration or selected DDL Synchronization for Incremental Synchronization on the Select Migration Type page.

The storage types supported for target table objects are Default, Row storage, Column Storage, and Hybrid columnar storage. For more information, see default_table_store_format.
Note
The value Default means that other parameters are automatically set based on the parameter configurations of the target. Table objects in schema migration and new table objects in incremental DDL synchronization are written to the corresponding schemas based on the specified storage type.
Click Precheck to start a precheck on the data migration task.
During the precheck, the data transmission service checks the read and write privileges of the database users and the network connections of the databases. A data migration task can be started only after it passes all check items. If an error is returned during the precheck, you can perform the following operations:
Identify and troubleshoot the problem and then perform the precheck again.
Click Skip in the Actions column of the failed precheck item. In the dialog box that prompts the consequences of the operation, click OK.
After the precheck succeeds, click Start Task.
If you do not need to start the task now, click Save. You can start the task later on the Migration Tasks page or by performing batch operations. For more information about batch operations, see Perform batch operations on data migration tasks.
The data transmission service allows you to modify the migration objects and their row filtering conditions when a migration task is running. For more information, see View and modify migration objects and their filter conditions. After the data migration task is started, it is executed based on the selected migration types. For more information, see View migration details.