Updated on 2024-09-13 GMT+08:00

Connecting to a GaussDB Instance

GaussDB instances can be connected using gsql, DBeaver, Navicat, or Data Admin Service (DAS).

Table 1 GaussDB instance connection modes

Connect Through

IP Address

Description

Comments

DAS

Not required

Huawei Cloud DAS enables you to manage databases on a web-based console. It supports SQL execution, advanced database management, and intelligent O&M, simplifying database management and improving both efficiency and data security. The permissions required for connecting to a GaussDB instance through DAS are enabled by default.

Easy to use, secure, advanced, and intelligent

gsql

Private IP address/EIP

gsql is a client tool provided by GaussDB. You can use gsql to connect to the database and then enter, edit, and execute SQL statements in an interactive manner.

To achieve a higher data transmission rate and security level, migrate your applications to a server that is in the same subnet as your GaussDB instance and use a private IP address to access the instance. The bandwidth is not limited for private network connections.

DBeaver

EIP

DBeaver is a GUI-based database management tool. You can use this tool to view database schemas, execute SQL queries and scripts, browse and export data, process BLOB/CLOB data, and modify database schemas.

Open-source and easy-to-use

Navicat

EIP

Navicat is a database management tool. You can easily view and edit data on its graphical interface. For example, you can insert, delete, update, and query data, process SQL statements or scripts, use functions, and generate data.

Stable and easy to use

Figure 1 shows how an instance is connected.

Figure 1 Connecting to an instance through a private network and an EIP
  • If the ECS and GaussDB instance are in the same VPC and security group, they can communicate with each other through the private network by default. In this case, you can connect to the instance through a private IP address.
  • If the ECS and GaussDB instance are in the same VPC but different security groups, you need to set security group rules for both the GaussDB instance and ECS, and then connect to the instance through a private IP address.
    • GaussDB instance: Configure an inbound rule for the security group with which the GaussDB instance is associated. For details, see Configuring Security Group Rules for a GaussDB Instance.
    • ECS: The default security group rule allows all outgoing data packets. In this case, you do not need to configure a security group rule for the ECS. If not all outbound traffic is allowed in the security group, you need to configure an outbound rule for the ECS to allow all outbound packets.
  • If the ECS and GaussDB instance are in different VPCs, you can bind an EIP to the ECS and use the EIP to connect to the instance. Ensure that both the ECS and GaussDB instance have EIPs.
    • For details about how to bind an EIP to an ECS, see Binding an EIP.
    • For details about how to bind an EIP to a GaussDB instance, see Binding an EIP.