Updated on 2024-05-07 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 a database and then enter, edit, and execute SQL statements in an interactive manner. For details about the connection mode, see Connecting to a DB Instance.

For distributed instances, you can use a client tool to connect to a database through any CN. Before connection, you must obtain the IP address and port number of the server where the CN is deployed. The client tool can access the database by connecting to any CN. Do not connect to a database through a DN when services are running properly.