You must configure data sources before you create a data migration project. Before you start a data migration task, you must add a MySQL database as the source or destination data source. This topic describes how to create a MySQL 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.
Procedure
Log on to the OMS console.
In the left-side navigation pane, click Data Source Management.
On the Data Source Management page, click Create Data Source in the upper-right corner.
In the Create Data Source dialog box, select MySQL 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.
Database Attributes Database attributes include Primary Database, Primary Database + Standby Database, and Standby Database. When you configure the primary database, you can choose whether to select the following option: Allow OMS to automatically write heartbeat data into this instance during incremental synchronization. This resolves the problem of high latency when no business data is written in the source database. - If you select this option, OMS creates the
drc.heartbeattable in the MySQL database and updates the table to store the synchronization timestamps. This prevents OMS from displaying lengthy latency information when the source database is not processing business traffic.
Notice
The MySQL database user must have the privileges to create and write tables. For more information, see User privileges. - If you do not select this option, OMS does not create the
drc.heartbeattable.
Host IP Address The IP address of the host where the database is located. You must specify the IP address of the physical server that hosts the Relational Database Service (RDS). Do not enter the IP address of any middleware. Port The port number of the host where the database is located. Username The name of the MySQL database user for data migration or synchronization. Password The password of the database user. Database Name Optional. The name of the MySQL database. Remarks Optional. The additional information about the data source. Click Test Connection to verify the network connection between OMS and the data source, as well as the validity of the username and password. You can specify a database as the source or destination.
After the connection test succeeds, click OK.