DBeaver

Updated at:
Copy as MD

Connect PolarDB for PostgreSQL (Compatible with Oracle) to DBeaver using a custom Java Database Connectivity (JDBC) driver.

Prerequisites

Before you begin, ensure that you have:

Gather the following connection details before you start — you will need them in step 2:

DetailWhere to find it
HostPolarDB cluster endpoint
PortPolarDB cluster port
Database/SchemaDatabase name in the cluster
UsernameDatabase account name
PasswordDatabase account password

Step 1: Add the JDBC driver

  1. In the DBeaver menu, choose Database > Driver Manager. In the Driver Manager dialog box, click New.

image
  1. In the Create new driver dialog box, go to the Settings tab and configure the following fields:

    FieldValueDescription
    Driver NamePolarDBA display name for this driver in DBeaver
    Class Namecom.aliyun.polardb2.DriverThe fully qualified Java class name that DBeaver uses to load the JDBC driver
    URL Templatejdbc:polardb2://{host}[:{port}]/[{database}]The connection URL pattern DBeaver uses to build the database URL. The {host}, {port}, and {database} placeholders are filled in when you create a connection
    Default Port(Optional)Can also be specified when creating a database connection
    Default Database(Optional)Can also be specified when creating a database connection
    Default User(Optional)Can also be specified when creating a database connection
image
  1. Go to the Libraries tab and click Add File to upload the custom JDBC driver. For instructions on downloading the driver, see JDBC.

Step 2: Create a database connection

  1. Click image to open the Connect to a database dialog box.

  2. Select the PolarDB custom JDBC driver and click Next.

image
  1. Enter the connection details you gathered earlier:

    DBeaver fieldValue
    HostPolarDB cluster endpoint
    PortPolarDB cluster port
    Database/SchemaDatabase name
    UsernameDatabase account name
    PasswordDatabase account password
image
  1. Click Finish to save the connection.