You must configure data sources before you create a data migration project. Before you start a data migration project, you must add an OceanBase Community Edition database as the source or destination data source. This topic describes how to add an OceanBase Community Edition 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 Create and authorize a database user.
You have deployed an OBProxy.
Procedure
Log on to the OMS Community Edition console.
In the left-side navigation pane, click Data Source Management.
On the Data Sources page, click Create Data Source in the upper-right corner.
In the Create Data Source dialog box, specify the fields. The default value of Data Source Type is OceanBase-CE.
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.
Tenant Type The type of tenants of OceanBase Community Edition. At present, only MySQL tenants are supported. OCP Cluster (Optional) The OceanBase Cloud Platform (OCP) cluster associated with the data source. Select an OCP cluster from the drop-down list. - Check whether the data source is managed in the selected OCP cluster.
- This parameter ensures that OMS Community Edition obtains the incremental logs of OceanBase Community Edition. If you do not set this parameter, you cannot select Incremental Migration, Incremental Synchronization, or Reverse Incremental Migration.
Connection Mode Valid values: Manual Input and Command-line Connection String. - Manual Input: Enter the public IP address and port number of OceanBase Community Edition.
- Command-line Connection String: Enter a command-line connection string.
Host IP Address The IP address of the host where the database is located. Port The OBProxy port of the OceanBase Community Edition cluster. Tenant Name The name of the tenant of OceanBase Community Edition. Cluster Name The name of the cluster where the tenant of OceanBase Community Edition resides. Database Username The username of OceanBase Community Edition for data migration or synchronization. We recommend that you create a dedicated database user for data migration. Database Password The password of the database user. DB Name (Optional) The name of the database. Remarks (Optional) Additional information about the data source. (Optional) In the Create Data Source dialog box, click Show next to Advanced Options to set the parameters as needed.
Parameter Description Configurl (Optional) The actual IP address of the server that runs OceanBase Community Edition. - If you have specified OCP Cluster, this parameter is not displayed. OMS Community Edition obtains the ConfigUrl from the OCP cluster to which the server belongs by default.
- If you did not specify OCP Cluster, you can specify the Username and Password parameters, click Search in OBServer next to the ConfigUrl field to obtain the IP address from the corresponding OBServer.
If the query fails, you can run theshow parameters like 'obconfig_url'command in the sys tenant of OceanBase Community Edition. The returned value is the ConfigUrl.
Username (Optional) It is the value specified for the drc_userparameter in theconfig.yamlfile when you deploy OMS Community Edition.
The user reads the incremental logs of OceanBase Community Edition and obtains database schemas. You must create the user in the sys tenant.Password (Optional) It is the password of the drc_userparameter._OCEANBASE_INNER_DRC_USER Password (Optional) The admin user is used to migrate tables without unique keys in OceanBase Database. When you migrate a table without a unique key, you must enter the password of the _OCEANBASE_INNER_DRC_USERuser.When you create a project to migrate or synchronize data from an OceanBase database, you must perform the following operations:
For schema migration, schema synchronization, or incremental synchronization, specify the username and password. If you do not specify OCP Cluster, you must specify Configurl.
For the migration of a table without a primary key, specify the password of
_OCEANBASE_INNER_DRC_USER.
When you create a project to migrate data to an OceanBase database, you must specify the username and password for reverse incremental migration. If you do not specify OCP Cluster, you must specify Configurl.
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 OK.