This topic describes how to connect to OceanBase Cloud by using a public IP address.
Prerequisites
You have created a cluster instance. For more information, refer to Create an instance.
Procedure
Log in to the OceanBase Cloud console, and in the left-side navigation pane, click Instances.
On the Instances page, expand the the target cluster instance and click Connect > Get Connection String under the target instance.
In the dialog box that appears, click Connect via Public Network.
Under Step 1: Get Public Endpoint, click Get Public Endpoint.
Once the public endpoint is generated, complete the following configurations under Step 2: Security Settings, then, click Next Step.
Add an IP address: Click Add to add your outbound IP to the allowlist.
Add My Current IP Address: Your current IP address is automatically obtained and entered. Other IP addresses must be manually entered.
Allow Access from Anywhere:
0.0.0.0is automatically entered. In this case, all IP addresses can be used to access the current cluster instance.
Download the CA certificate: Download the certificate and complete the configuration. For more information, refer to SSL link encryption.
Under Step 3: Connect, create a database and an account.
Create a database: Click + Create Database. In the dialog box that appears, specify a name for the database, such as
default_database. Then, click Create.Create an account: Click + Create Account. In the dialog box that appears, specify an account name and click Generate Password. Then, the system will automatically generate a password for your account. You can also define a password. The password must be 10 to 32 characters in length and contain at least two digits, two uppercase letters, two lowercase letters, and two special characters. Supported special characters are
@ # $ % _ +.Notice
Please save the password generated in a secure place when the account is created.
Select MySQL CLI and copy the generated connection string to your client.
Currently, OceanBase Cloud supports a wide range of clients, drivers, and languages. For more information, see Overview.
In the CLI of your MySQL client, enter the account name and password generated in Step 6. Then, you can connect to and use OceanBase Cloud.