This topic provides step-by-step instructions on how to connect to OceanBase Cloud Database using a Huawei Cloud VPC Endpoint.
Prerequisites
- You have registered a Huawei Cloud root account.
- You have registered an OceanBase Cloud account and created a cluster instance and tenant. For details, see Create a cluster instance and Create a tenant. This example uses a MySQL-compatible tenant.
Procedure
Log in to the OceanBase Cloud console and click Networking in the left navigation pane.
On the Private Connectivity tab, click Create Private Connection.
In the Step 1: Create your endpoint service section, select Huawei Cloud as the cloud service provider, and choose the target instance and tenant.
In the Step 1: Create your endpoint service section, go to the Huawei Cloud console. Hover your mouse over your account in the upper-right corner, select My Credentials from the drop-down menu, and copy your Account ID from the API Credentials page.
Back in the OceanBase Cloud console, enter your account ID and click Create Endpoint Service.
After creating the Endpoint service, navigate to Step 2: Create an endpoint and copy the Service ID for later use.
Open the Huawei Cloud VPC Endpoints page, click Buy Endpoint, and configure the following:
ParameterDescriptionRegion Select the same region as your OceanBase Cloud instance. Service Category Select Find by Service Name. VPC Endpoint Service Name Enter the Service ID copied in Step 6 and click Verify to confirm. VPC Select your Virtual Private Cloud (VPC). Subnet Select the subnet to which the Endpoint belongs. IPv4 Address Select Automatic Allocation of IPv4 Address. Click Next. In the Endpoint list, click the ID of the newly created Endpoint to view its details, and copy the Endpoint ID and IPv4 address.
Back in the OceanBase Cloud console, navigate to Step 2: Create an endpoint, paste the Endpoint ID and IP address, then click Next Step.
In the Step 3: Connect section, select an existing database and account, or create a new one, and choose MySQL CLI as the connection method. Copy the generated connection string to your client.
Currently, OceanBase Cloud supports multiple clients, drivers, and languages. For details, see Overview.
In the CLI of your MySQL client, enter the account name and password generated in Step 10. Then, you can connect to and use OceanBase Cloud.
What to do next
After creating an Endpoint, you can view its details on the Topology Diagram tab. This tab is located on the tenant's Overview page. If you need to update the Endpoint due to a VPC change, OceanBase Cloud allows you to delete the existing Endpoint and recreate it.
Delete an endpoint:
In the OceanBase Cloud console, navigate to the Instances page and click the name of the target tenant to go to its overview page.
In the Topology Diagram section, click the delete button to remove the existing endpoint.
