Updated on 2025-03-13 GMT+08:00

Using gsql to Connect to a Database

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. For details about the connection mode, see Using gsql to Connect to an Instance.

For centralized instances, you can use a client tool to connect to a database through a primary DN. Before connection, you must obtain the IP address and port number of the server where the primary DN is deployed. You are not advised to connect a database through a standby DN when services are running properly.