Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Step 3: Connecting to a Cluster

Updated on 2023-03-17 GMT+08:00

Scenario

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.

  1. Obtain the name, username, and password of the database to be connected.

    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.

  2. Obtaining the Public Network Address of the Cluster: Connect to the cluster database using the public network address.
  3. Connecting to the Cluster Database Using Data Studio: Download and configure the Data Studio client and connect to the cluster database.

Obtaining the Public Network Address of the Cluster

  1. Log in to the GaussDB(DWS) management console.
  2. In the navigation tree on the left, click Clusters.
  3. In the cluster list, select a created cluster (for example, dws-demo) and click next to the cluster name to obtain the public network address.

    The public network address will be used in Connecting to the Cluster Database Using Data Studio.

Connecting to the Cluster Database Using Data Studio

  1. GaussDB(DWS) provides a Windows-based Data Studio GUI client. The tool depends on JDK, so you must install Java 1.8.0_141 or later on the client host.

    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.

  2. Log in to the GaussDB(DWS) management console.
  3. Click Connections.
  4. On the Download Client and Driver page, download Data Studio GUI Client.

    • Select Windows x86 or Windows x64 based on the operating system type and click Download to download the Data Studio tool matching the current cluster version.

      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.

    • Click Historical Version to download the corresponding Data Studio version. You are advised to download the Data Studio based on the cluster version.

  5. Decompress the downloaded client software package (32-bit or 64-bit) to the installation directory.
  6. Open the installation directory and double-click Data Studio.exe to start the Data Studio client. See Figure 1.

    Figure 1 Starting the client

  7. Choose File > New Connection from the main menu. See Figure 2.

    Figure 2 Creating a connection

  8. In the displayed New Database Connection window, enter the connection parameters.

    Table 1 Connection parameters

    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:

    • Current Session Only: The password is saved only in the current session.
    • Do Not Save: The password is not saved.

    -

    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:

    Table 2 Configuring SSL 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:

    • require
    • verify-ca

    GaussDB(DWS) does not support the verify-full mode.

    Figure 3 Configuring SSL parameters

  9. Click OK to establish the database connection.

    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 SQL Terminal window on the Data Studio page.

    Figure 4 Successful login

    For details about how to use other functions of Data Studio, press F1 to view the Data Studio user manual.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback