DBeaver
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:
DBeaver installed on your machine
A database account created in the PolarDB cluster. See Create a database account
The IP address of your host added to the IP address whitelist of the cluster. See Configure a whitelist for a cluster
Gather the following connection details before you start — you will need them in step 2:
| Detail | Where to find it |
|---|---|
| Host | PolarDB cluster endpoint |
| Port | PolarDB cluster port |
| Database/Schema | Database name in the cluster |
| Username | Database account name |
| Password | Database account password |
Step 1: Add the JDBC driver
In the DBeaver menu, choose Database > Driver Manager. In the Driver Manager dialog box, click New.

In the Create new driver dialog box, go to the Settings tab and configure the following fields:
Field Value Description Driver Name PolarDBA display name for this driver in DBeaver Class Name com.aliyun.polardb2.DriverThe fully qualified Java class name that DBeaver uses to load the JDBC driver URL Template jdbc: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 connectionDefault 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

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
Click
to open the Connect to a database dialog box.Select the PolarDB custom JDBC driver and click Next.

Enter the connection details you gathered earlier:
DBeaver field Value Host PolarDB cluster endpoint Port PolarDB cluster port Database/Schema Database name Username Database account name Password Database account password

Click Finish to save the connection.