This topic describes how to connect to OBKV using Huawei Cloud VPC Endpoint.
Prerequisites
- You have registered a Huawei Cloud primary account.
- You have registered an OceanBase Cloud account and created an OBKV cluster instance and tenant. For more information, see Create an instance and Create a tenant.
Procedure
Log in to the OBKV console. On the instance list page, expand the target instance's information, and under the target tenant, click Connect.
In the dialog box that appears, select Use PrivateLink.
In the Step 1: Create your endpoint service section, follow the prompts to go to the Huawei Cloud console. Hover your mouse over the account in the upper-right corner of the page, and click My Credentials from the drop-down menu to go to the API Credentials page. Copy the account ID.
Back in the OBKV console, enter your account ID and click Create Endpoint Service.
After the endpoint service is created, copy and save the service ID in the Step 2: Create an endpoint section.
Go to the Huawei Cloud Endpoints page. Click Buy Endpoint in the upper-right corner and complete the configuration with the following information:
ParameterDescriptionRegion Select the region where your business is located or is close to your business. Service Type Select to find the service by name. Service Name Enter the service ID copied in Step 5 and click Verify. Virtual Private Cloud Select the virtual private cloud to which the endpoint belongs. Subnet Select the subnet to which the endpoint belongs. IPv4 Address Select to automatically allocate an IPv4 address. Click Buy Now, and on the endpoint list page, click the ID of the endpoint you just created to go to its basic information page. Copy the ID and IPv4 address.
Back in the OBKV console, enter the ID copied in the previous step in the Step 2: Create an endpoint section, and click Connect.
In Step 3: Connect, select your database and account, or choose to create a new one.
Notice
If you choose to create a new account, please keep the password generated during account creation properly.
Select MySQL CLI as the connection method, and copy the generated connection string to your client. Replace
addresswith the IP address recorded in Step 7.Enter the account and password used in Step 9 in your MySQL CLI. After a successful connection, you can access and use the database.
What to do next
After creating an endpoint, you can view the information about the created endpoint under the topology diagram on the tenant console. If you need to modify an existing endpoint due to reasons such as changing the VPC, OBKV currently supports deleting the existing endpoint and recreating it. To delete an endpoint, perform the following operations:
On the instance list page of the OBKV console, click the name of the target tenant to enter the tenant console.
Under Topology Diagram on the tenant console, click the delete button to remove the created endpoint.
