After you create a business tenant, you can verify the connectivity between OceanBase Database Proxy (ODP) and OceanBase Database by using the following method:
Use the MySQL Command Line Client or OBClient to log on to the endpoint (in the IP address:port format) of ODP. Ensure that you can connect to OceanBase Database and run the test statements.
Connect to OceanBase Database
$obclient -h10.10.10.1 -P2883 -uuser_name@tenant_name#cluster_name -p
Enter password:
Welcome to the OceanBase. Commands end with ; or \g.
Your OceanBase connection id is 37676
Server version: OceanBase 4.0.0.0 (r101000022022120716-0d7927892ad6d830e28437af099f018b0ad9a322) (Built Dec 7 2022 16:22:15)
Copyright (c) 2000, 2018, OceanBase and/or its affiliates. All rights reserved.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
obclient [(none)]>
Note
Connection parameters:
-h: specifies the IP address to connect to OceanBase Database, which is usually an ODP domain name.-u: specifies the tenant account. Two account formats are supported: Username@Tenant name#Cluster name and Cluster name:Tenant name:Username. The default username of the administrator of a MySQL tenant isroot. The default administrator username of an Oracle tenant isSYS.-P: specifies the OceanBase Database connection port, which is also the listening port of ODP.-p: specifies the account password. For security reasons, you do not need to specify this parameter. In that case, you will be prompted to enter a password later. The password is invisible.-c: specifies that comments must not be ignored in the runtime environment of MySQL.-Ne: specifies to execute an SQL statement when connecting to OceanBase Database in MySQL mode.
More information
For more information about how to connect to a database, see Overview.