A data source must be configured before you create a data migration project. To migrate data from or to a TiDB database, you must create the TiDB database as the source or destination data source. This topic describes how to create a TiDB database as a 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 project and grant the required data operation privileges to the user. For more information, see Create and authorize 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 link between the TiDB database and the Kafka data source in advance.
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 project.
Procedure
Log on to the OMS console.
In the left-side navigation pane, click Data Source Management.
On the Data Sources page, click New Data Source in the upper-right corner.
In the New Data Source panel, select TiDB for Data Source Type.
Set the following parameters.
Parameter Description Data Source Identifier The name of the data source. The name must be 1 to 32 characters in length and can contain Chinese characters, digits, and case-sensitive letters. Region Select the region where the data source resides from the drop-down list. The region is the value you set for the cm_regionparameter when you deploy OMS.
Notice:- This parameter is displayed only when multiple regions are available.
- Make sure that the regions specified for the data source and configured in OMS are the same. Otherwise, the migration and synchronization performance may be poor.
Host IP Address The IP address of the server where the TiDB database is deployed. Port The port number corresponding to the IP address of the server where the TiDB database is deployed. Username The name of the TiDB database user for data migration or synchronization. Password The password of the database user. Database Name Optional. The name of the TiDB database. Bind a Kafka Data Source A Kafka data source enables OMS to obtain incremental logs from the TiDB database. - If you set this parameter, select a Kafka data source and the corresponding Kafka topic from the drop-down list.
- If you do not set this parameter, you cannot select incremental migration when you create a project to migrate data from a TiDB database to an OceanBase database in MySQL tenant mode.
Remarks Optional. Additional information about the data source. Click Test Connection to verify the network connection between OMS and the data source, and the validity of the username and password.
After the connection test succeeds, click OK.