After you create an OceanBase Database tenant, you can verify the connectivity between the OceanBase Database Proxy (ODP) service and OceanBase Database by using the following method:
Use the MySQL Command Line Client or OBClient to log on to the endpoint (IP address:port format) of ODP. Ensure that you can connect to OceanBase Database and run the test statements.
Connect to OceanBase Database
$obclient -h[IP address of ODP] -P2883 -u[Username]@[Tenant name]#[Cluster name] -p -A
Enter password:
Welcome to the OceanBase. Commands end with ; or \g.
Your OceanBase connection id is 3221583668
Server version: OceanBase 3.2.4.0 (r100000072022102819-2a28da9e758e2d232c41fa1a1b0070a08b77dd7d) (Built Oct 28 2022 19:46:38)
Copyright (c) 2000, 2018, OceanBase Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
The connection parameters are as follows:
-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.