This topic describes how to connect to OceanBase Cloud using Google Cloud Private Service Connect.
Prerequisites
- You have registered a Google Cloud account and created a project.
- You have registered an OceanBase Cloud account, and created a cluster instance and a 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 Step 1: Create your Private Service Connect service, select Google Cloud as the cloud provider, and select the target instance and tenant.
Open the Google Cloud console and copy the project ID displayed on the page.

Return to the OceanBase Cloud console. In Step 1: Create your Private Service Connect service, enter the project ID in 3. Create a Private Service Connect service and click Create.
After the service is created, copy the Target Service information in Step 2: Create an endpoint and connect.

Open the Private Service Connect page in the Google Cloud Networking Services console. Click + CONNECT ENDPOINT in the Endpoints section.
On the Connect endpoint page, enter the following information:
ParameterDescriptionTarget Select Published service. Endpoint name Specify a name for your Endpoint. Network Select a network for your Endpoint. Subnetwork Select a subnet for your Endpoint. IP Address Select an IP address for your Endpoint. If necessary, you can create a new one. 
Click ADD ENDPOINT.
On the Private Service Connect page, find the endpoint you just created and copy its PSC Connection ID.

Return to the OceanBase Cloud console. Enter the PSC Connection ID in the PSC Connection ID field under Step 2: Create an endpoint and connect, then click Connect.
In Step 3: Connect, select an existing database and account, or create a new one. Choose MySQL CLI as the connection method, and copy the generated connection string to your client.
Currently, OceanBase Cloud supports multiple clients, drivers, and languages. For more information, see Overview.
Enter the account name and password generated in Step 12 in the CLI of your MySQL client. You can then 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 VPC changes, 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 target tenant name to go to the tenant overview page.
On the Topology Diagram tab, click the delete button to remove the existing Endpoint.
