Before you create a data migration or synchronization task, you must configure the data sources. This topic describes how to create a TiDB 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 task and grant the required data operation permissions 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.
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 console of OMS Community Edition for the data migration task.
Procedure
Log in to the console of OMS Community Edition.
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 the system of OMS Community Edition.
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 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 located. Port The port number corresponding to the IP address of the server where the TiDB database is located. Username The name of the TiDB database user for data migration or synchronization. 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 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 a topic from the drop-down list. You must deploy a TiCDC cluster and a Kafka cluster to synchronize incremental data from a TiDB database to OceanBase Database Community Edition.
- If you do not select this option, you do not need to deploy a TiCDC or Kafka cluster. You can directly synchronize incremental data from a TiDB database by using OMS 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 test is passed, click OK.