This section describes how to use a database client to connect to the database in a GaussDB(DWS) cluster. In the following example, the Data Studio client tool is used for connection through the public network address. You can also use other SQL clients to connect to the cluster. For more connection methods, see Methods of Connecting to a Cluster.
If you use the client to connect to the cluster for the first time, use the database administrator username and password set in Step 2: Creating a Cluster to connect to the default database gaussdb.
The public network address will be used in Connecting to the Cluster Database Using Data Studio.
In the Windows operating system, you can download the required JDK version from the official website of JDK, and install it by following the installation guide.
If clusters of different versions are available, you will download the Data Studio tool matching the earliest cluster version after clicking Download. If there is no cluster, you will download the Data Studio tool of the earliest version after clicking Download. GaussDB(DWS) clusters are compatible with earlier versions of Data Studio tools.
Parameter |
Description |
Example |
---|---|---|
Database Type |
Select GaussDB A. |
GaussDB A |
Connection Name |
Name of a connection |
dws-demo |
Host |
IP address (IPv4) or domain name of the cluster to be connected |
- |
Host Port |
Database port |
8000 |
Database Name |
Database name |
gaussdb |
User Name |
Username for connecting to the database |
- |
Password |
Password for logging in to the database to be connected |
- |
Save Password |
Select an option from the drop-down list:
|
- |
Enable SSL |
If Enable SSL is selected, the client can use SSL to encrypt connections. The SSL mode is more secure than common modes, so you are advised to enable SSL connection. |
- |
When Enable SSL is selected, download and decompress the SSL certificate. For details, see (Optional) Downloading the SSL Certificate. Click the SSL tab and configure the following parameters:
Parameter |
Description |
---|---|
Client SSL Certificate |
Select the sslcert\client.crt file in the decompressed SSL certificate directory. |
Client SSL Key |
Only the PK8 format is supported. Select the sslcert\client.key.pk8 file in the directory where the SSL certificate is decompressed. |
Root Certificate |
When SSL Mode is set to verify-ca, the root certificate must be configured. Select the sslcert\cacert.pem file in the decompressed SSL certificate directory. |
SSL Password |
Set the password for the client SSL key in PK8 format. |
SSL Mode |
Supported SSL modes include:
GaussDB(DWS) does not support the verify-full mode. |
If SSL is enabled, click Continue in the displayed Connection Security Alert dialog box.
After the login is successful, the RECENT LOGIN ACTIVITY dialog box is displayed, indicating that Data Studio is connected to the database. You can run the SQL statement in the window on the Data Studio page.
For details about how to use other functions of Data Studio, press F1 to view the Data Studio user manual.