Updated on 2023-10-23 GMT+08:00

Connecting to a Database

Client tools for connecting to a database include DAS, gsql, and APIs (such as ODBC and JDBC).

  • 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 efficiency and data security. The permissions required for connecting to instances through DAS are enabled by default. You are advised to use DAS to connect to instances. For details about how to connect to GaussDB, see Data Admin Service User Guide.
  • 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, see Connecting to a DB Instance.
  • You can use standard database APIs in APIs, such as ODBC and JDBC, to develop GaussDB-based applications.
  • In the primary/standby deployment, 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.