Add a whitelist for a MySQL database
This topic describes how to add a whitelist for a MySQL database that is an RDS instance, a PolarDB instance, or a self-managed database in a virtual private cloud (VPC).
Background
When you select MySQL >> OceanBase MySQL Mode for the assessment mode, the supported instance types are RDS Instance, PolarDB Instance, Self-Managed Database in VPC, and Self-Managed Database with Public IP Address. OceanBase Migration Assessment (OMA) uses a public IP address to access the public network. Therefore, to use a public network data source, you must add a whitelist of public IP addresses for the data source. You do not need to add a whitelist when you use other types of data sources.
Add a whitelist for an RDS for MySQL instance
If you select MySQL >> OceanBase MySQL Mode for the assessment mode and select RDS Instance for the instance type when you create an online assessment task, you must set an IP address whitelist for the instance.
Record the RDS instance ID selected from the Instance ID drop-down list.
Go to the Instances page of the ApsaraDB for RDS console and click the name of the instance to enter its details page.
In the left-side navigation pane, click Data Security.
On the Whitelist Settings tab, click Modify for the target group.

In the Modify Whitelist Group dialog box, add a Group Whitelist.
The whitelisted IP address is the IP address (CIDR block) of the OMA server displayed in the Select Source Database Type dialog box on the Migration Assessment page.
ImportantMultiple IP addresses must be separated with commas (,), and no spaces are allowed before or after the commas.
You can add up to 1,000 IP addresses or CIDR blocks to an instance. If a large number of IP addresses are to be added, we recommend that you combine them into CIDR blocks. Example: 10.10.10.0/24.
127.0.0.1 indicates that no access is allowed from any IP address.
Click OK.
Add a whitelist for a PolarDB for MySQL instance
If you select MySQL >> OceanBase MySQL Mode for the assessment mode and select PolarDB Instance for the instance type when you create an online assessment task, you must set an IP address whitelist for the instance.
Record the PolarDB instance ID selected from the Add Data Source dialog box.
Go to the Clusters page of the ApsaraDB for PolarDB console and click the name of the corresponding cluster to enter its details page.
In the left-side navigation pane, choose Settings and Management > Whitelists.
On the IP List page, click Add IP Whitelist.
You can also click Modify next to an existing whitelist to edit it.

In the Add IP Whitelist dialog box, configure the parameters.
Field
Description
IP Whitelist Name
The name must be 2 to 120 characters in length and can contain lowercase letters, digits, and underscores (_). It must start with a letter and end with a letter or digit.
IP Addresses
Copy the CIDR block of the OMA server from the Select Source Database Type dialog box on the Migration Assessment page and paste it here. Note the following rules:
You can enter an IP address such as 192.168.0.1 or a CIDR block such as 192.168.0.0/24.
Multiple IP addresses and CIDR blocks must be separated with commas (,). Example: 192.168.0.1,192.168.0.0/24.
127.0.0.1 indicates that no access is allowed from any IP address.
You can create up to 50 IP address whitelists and add up to 1,000 IP addresses or CIDR blocks to all the whitelists.
Click OK.
Add a whitelist to an ECS instance
If you select MySQL >> OceanBase MySQL Mode for the assessment mode and select Self-Managed Database in VPC for the instance type when you create an online assessment task, you must add the CIDR block of the OMA server to the whitelist of the corresponding database. This is because a self-managed database in VPC may have access restrictions on the Elastic Compute Service (ECS) platform but the data source for data assessment must be accessible to the IP address of the OMA server.
Copy the VPC ID selected from the VPC drop-down list.
Go to the Security Groups page of the ECS console. Select VPC ID from the drop-down list next to Create Security Group and paste the VPC ID to filter security groups.

Click the name of the target security group to go to its details page.
Add an IP address on the Inbound tab.
Copy the IP address (CIDR block) of the OMA server from the Select Source Database Type dialog box in the OMA console.
On the security group details page, click Quick Add on the Inbound tab in the Access Rule section.
You can also click Add Rule to manually add information such as Port Range and Authorization Object.

In the Quick Add dialog box, paste the IP address to the Authorization Object field and select a corresponding port range from the Port Range section.
For example, the port range may be 1521 for Oracle and 3306 for MySQL.

Click OK.