Help Center/ Cloud Bastion Host/ FAQs/ Troubleshooting/ SSO O&M Faults/ Configuring a Customized Driver for DBeaver to Connect to GaussDB Databases
Updated on 2024-12-03 GMT+08:00

Configuring a Customized Driver for DBeaver to Connect to GaussDB Databases

GaussDB databases can be connected through the custom driver configured on DBeaver.

Version Requirements

3.3.52.0 or later.

Network Requirements

  • PC to bastion host: 18000
  • Port for connections between the bastion host and GaussDB databases: The default port is 8000.

Configuration on the Bastion Host

  1. Log in to the web page of the bastion host, click Download Center in the upper right corner, and download SSOTool Windows.

    Figure 1 Downloading the login tool

  2. Choose Resource > Host and add a GaussDB protocol host.
  3. Then, choose Policy > ACL Rule to associate the user with the access permission for the GaussDB host.

Configuring the DBeaver Client

  1. Start the DBeaver client, choose Database > Driver Manager, and click New.

    Table 1 Parameter descriptions

    Parameter

    Description

    Driver Name

    Set a name that is easy to identify, for example, GaussDB.

    Driver Type

    Select Generic.

    Class Name

    org.postgresql.Driver

    URL Template

    jdbc:postgresql://{host}[:{port}]/[{database}]

    Default Port

    Port of the database to be connected. Default port: 8000

  2. Click the Libraries tab, click Add File, and add gsjdbc4.jar.

    Download the gsjdbc4.jar file. The driver package file is compatible with the database version.

    Decompress the package, go to the GaussDB_driver\GaussDB_driver\Centralized\Euler2.5_x86_64 directory, and decompress the JDBC package.

  3. Click OK, edit the corresponding driver again, and click Find Class.
  4. Open the DBeaver client and directly connect to the target GaussDB database. Select the driver file created in 1.
  5. Click OK. After the connection is successful, open the C:\sso\SsoTool\DBeaver\General\.DBeaver\data-sources.json file, verify that the corresponding connection is generated, and open the C:\sso\SsoTool\ssotool.conf file.

    Add the C:\sso\SsoTool\DBeaver\General\.DBeaver\data-sources.json parameter to the C:\sso\SsoTool\ssotool.conf file, uncomment the corresponding line in the ssotool.conf file, and save the file.

  6. Choose Operation > Host Operations and access the host using the corresponding protocol.