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 and supports SQL execution, advanced database management, and intelligent O&M, simplifying database management and improving working efficiency and data security. The permissions required for connecting to a GaussDB instance through DAS are enabled by default. Using DAS to connect to your DB instance is recommended, which is more secure and convenient. 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 about the connection modes, see Connecting to a DB Instance.
  • You can use standard database APIs, such as ODBC and JDBC, to develop GaussDB-based applications.
  • 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.