Obtain connection parameters
When you connect to an OceanBase database in a cloud deployment, each tenant has unique connection parameters, such as a database endpoint and port. You can log on to the OceanBase console to obtain them.
Background information
For example, you can use the following command to connect to a database with an OBClient client:
$ obclient -hxxx.xxx.xxx.xxx -P3306 -ua**** -p****** -DtestThe parameters are described as follows:
Parameter | Description |
-h | The domain name for the OceanBase database connection. |
-P | The port for the OceanBase database connection. The default port is 3306 for tenants in MySQL mode, 1521 for tenants in Oracle mode, and 3307 for tenants in Key-Value mode. |
-u | The connection account of the tenant. |
-p | The password for the account. For security, omit this parameter and enter the password at the prompt. The password text will not be visible. |
-D | The database name. Note This parameter applies only to MySQL mode. |
Procedure
Log on to the OceanBase Management Console .
In the navigation pane on the left, click Cluster List.
On the Cluster List page, find the destination cluster and click its name to go to the Cluster Workbench page.
On the Tenant List page, click the destination tenant to go to the Tenant Workbench page for the MySQL or Oracle mode.
Obtain the connection parameters:
Obtain the values for
-hand-P. The deployment diagram displays the connection information for the current tenant. This information includes the connection string (domain name) and the port.
Obtain the value for the
-uparameter. On the Account Management page, you can view or create an account name. For more information, see Create an account.The value for the
-pparameter is the password that you set when you created the account. For more information, see Create an account.