You must configure data sources before you create a data migration task. Before you start data migration, you can add a TiDB database as the data source. This topic describes how to create a TiDB data source in OceanBase Migration Service (OMS).
Prerequisites
You have obtained the IP address and port number of the related database.
You have created a database user for data migration.
We recommend that you create a dedicated database user for the data migration task and grant the required data operation privileges to the user. For more information, see Create a database user.
If you need to subscribe to incremental logs from the TiDB database, deploy a Kafka data source and a Kafka topic. In addition, you must create a task to synchronize data from the TiDB database to the Kafka data source in advance. For more information, see the TiDB documentation.
Notice
The names of the databases and tables that you subscribe to in the TiDB database must be the same as those specified in the OMS console for the data migration task.
Procedure
Log in to the OMS console.
In the left-side navigation pane, click Data Source Management.
On the Data Source Management page, click New Data Source in the upper-right corner.

In the New Data Source dialog box, select TiDB for Data Source Type.
Configure the following parameters.
Parameter Description Data Source Identifier We recommend that you set it to a combination of digits and letters. It must not contain any spaces and cannot exceed 32 characters in length.
Notice
The data source identifier must be globally unique in OMS.Region Select the region where the data source resides from the drop-down list. The region is the value that you set for the cm_regionparameter when you deployed OMS.
Notice- This parameter is displayed only when multiple regions are available.
- Make sure that the mappings between the data source and the region are consistent. Otherwise, the migration and synchronization performance can be poor.
Host IP Address The IP address of the server where the TiDB database is located. Port The port number corresponding to the IP address of the server where the TiDB database is located. Database Username The name of the TiDB database user for data migration or synchronization. Database Password The password of the database user. DB Name (Optional) The name of the TiDB database.
Note
If this parameter is specified, you can select only migration objects in the specified database when the data source serves as the source of a data migration task.Bind Kafka Data Source - Kafka data source and topic:
A Kafka data source saves binlogs and the incremental logs of the TiDB database that are converted by TiCDC for consumption by OMS.- If you select this option, select a Kafka data source and the corresponding Kafka topic from the drop-down list.
- If you do not select this option, you cannot select Incremental Synchronization for Migration Type when you create a task to migrate data from a TiDB database to a MySQL-compatible tenant of OceanBase Database.
- TiDB data format:
When you migrate data from a TiDB database to a MySQL-compatible tenant of OceanBase Database, you can select the TiCDC or TiDB Binlog data format from the drop-down list.
Remarks (Optional) Additional information about the data source. Click Test Connection to check whether OMS can connect to the data source and whether the specified username and password are valid.
After the test is passed, click OK.