OceanBase Cloud supports connecting to databases using both public and private IP addresses. This topic describes how to connect to a database using a public IP address.
Prerequisites
You have registered an OceanBase Cloud account and created a cluster instance and a tenant. The example in this topic uses an Oracle-compatible tenant. For more information, see Create a cluster instance and Create a tenant.
Procedure
Log in to the OceanBase Cloud console. On the Instances page, expand the target instance and click Connect > Get Connection String under the target tenant.
In the dialog box that appears, select Connect via Public Network.
(Optional) If you did not select Automatically Create Public Endpoint when creating the tenant, under Step 1: Get Public Endpoint, click Get Public Endpoint. If a public IP address already exists, skip this step.
After obtaining the public IP address, click Next. Under Step 2: Security Settings, click 1. Add IP address(es) to Allowlist and then click Add.
In the Add Allowlist dialog box, enter a custom group name and the IP addresses to be added to the allowlist, then click OK.
Add My Current IP Address: Your current IP address is automatically obtained and entered. Other IP addresses must be manually entered.
Allow All IP Addresses:
0.0.0.0is automatically entered. In this case, all IP addresses can be used to access the current tenant.
Under 2. Download the CA certificate to connect securely to the tenant, download the CA certificate and configure it. For more information, see SSL Link Encryption.
Under 3. Access Database, select your account.
You can also choose to create a new account: Click Account in the drop-down menu and select Create Account. Enter a custom account name and password, then click Create.
Note
Please keep the password generated during account creation secure.
Select the target connection method and copy the generated connection string to your client for database connection. OceanBase Cloud currently supports connections from various clients, drivers, and languages. For more information, see Overview of connection methods.
