Skip to main content

Connecting to Databend with SQL Clients

Databend provides a JDBC driver that enables connection to Databend from a client application, such as DBeaver. DBeaver comes with numerous pre-configured drivers for SQL, NoSQL, key-value databases, graph databases, search engines, and more. However, the Databend JDBC driver is not currently pre-configured in DBeaver, which means that you cannot locate and select Databend while creating a connection in the application. Nevertheless, you can manually add the driver to DBeaver, allowing you to establish a connection to Databend in the same way you would with a pre-configured database.

Adding Databend JDBC Driver to DBeaver

Follow these steps to add the Databend JDBC driver to DBeaver:

  1. In DBeaver, select Database > Driver Manager to open the Driver Manager, then click New to create a new driver.

  2. On the Settings tab, enter the required information for the new driver as follows:

SettingDatabendDatabend Cloud
Driver Namedatabenddatabendcloud
Driver TypeGenericGeneric
Class Namecom.databend.jdbc.DatabendDrivercom.databend.jdbc.DatabendDriver
URL Templatejdbc:databend://{user}:{password}@{host}:{port}/{database}jdbc:databend://{user}:{password}@{host}:{port}/{database}
Default Port8000443
Default Userrootcloudapp

Alt text Alt text

  1. On the Libraries tab, click Add Artifact, then copy and paste the following to the Dependency Declaration textbox:
Check for and Update to New Version

Databend recommends updating to the latest version of the Databend JDBC driver to access the latest features and enhancements, and to resolve any issues you may encounter. Please check for available updates at ​https://github.com/databendcloud/databend-jdbc/releases and install the latest version.

<dependency>
<groupId>com.databend</groupId>
<artifactId>databend-jdbc</artifactId>
<version>0.3.4</version>
</dependency>
  1. Click OK to close the windows.

User Authentication

If you are connecting to a self-hosted Databend instance, you can use the admin users specified in the databend-query.toml configuration file, or you can connect using an SQL user created with the CREATE USER command.

For connections to Databend Cloud, you can use the default cloudapp user or an SQL user created with the CREATE USER command. Please note that the user account you use to log in to the Databend Cloud console cannot be used for connecting to Databend Cloud.

Tutorials

Explore Databend Cloud for FREE
Low-cost
Fast Analytics
Easy Data Ingestion
Elastic Scaling
Try it today