You must configure data sources before you create a data migration project. Before you start a data migration project, you must add a TiDB database as the source or destination data source. This topic describes how to add a TiDB database as a data source in OceanBase Migration Service (OMS) Community Edition.
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 User privileges.
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. For more information, see TiDB User Guide.
Notice:
The names of the databases and tables that you subscribe to in the TiDB database must be the same as those specified in OMS Community Edition for the data migration project.
Procedure
Log on to the console of OMS Community Edition.
In the left-side navigation pane, click Data Source Management.
On the Data Source Management page, click Add Data Source in the upper-right corner.
In the Add Data Source dialog box, select TiDB for Data Source Type.
Specify the following parameters.
Parameter Description Data Source Identifier We recommend that you set it to a combination of Chinese characters, digits, and letters. It must not contain any spaces and cannot exceed 32 characters in length. 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 deploy OMS Community Edition.
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 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. Password The password of the database user. Database Name Optional. The name of the TiDB database. Bind Kafka Data Source A Kafka data source enables OMS Community Edition to obtain incremental logs from the TiDB database. - 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 migration when you create a project to migrate data from a TiDB database to OceanBase Community Edition.
Remarks (Optional) Additional information about the data source. Click Test Connection to verify the network connection between OMS Community Edition and the data source, as well as the validity of the username and password.
After the connection test is passed, click Add.