If you want to select public IP as the connection type when you create a data source with Azure as the cloud vendor, you must first add the data source IP address displayed in the OceanBase Cloud console to the allowlist of your MySQL database instance, self-managed Oracle database instance, or self-managed OceanBase Database instance to ensure access. Supported instance types for MySQL are Azure MySQL and self-managed MySQL.
Obtain the IP address to be added to the allowlist
Log in to the OceanBase Cloud console.
Go to the Create Data Source page.
In the left-side navigation pane, click Data Services > Data Sources.
On the Data Sources page, click Create Data Source in the upper-right corner and select the required data source type.
In the Create Data Source dialog box, select Azure for Cloud Vendor and Public Connection for Connection Method, and select the required instance type based on your needs.
Copy the IP address displayed below the Connection Information field.
Note
The selected region must be the same as the region where the Azure instance is located.

Add an IP address to the allowlist of an Azure MySQL instance
Log in to the Azure Database for MySQL servers page.
Click the name of the target server to go to the Overview page.
In the left-side navigation pane, click Settings > Networking.
In the Firewall rules section, enter the IP address in the Start IP address and End IP address fields, and create a new firewall rule.

Add an IP address to the allowlist of a self-managed MySQL/Oracle/OceanBase instance
Log in to the Azure virtual machines page.
Click the name of the target virtual machine to go to the Overview page.
In the left-side navigation pane, click Networking > Network settings.
In the Rules section, click Create port rule > Inbound port rule.

On the Add inbound security rule page, configure the following parameters. Other parameters can be left unchanged.
Parameter Description Source Select IP Address. Source IP addresses/CIDR ranges Enter the IP address copied from the Create Data Source page. Destination port ranges Enter the port displayed on the Create Data Source page. Protocol Select TCP. Click Add.