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:
-
In DBeaver, select Database > Driver Manager to open the Driver Manager, then click New to create a new driver.
-
On the Settings tab, enter the required information for the new driver as follows:
Setting | Databend | Databend Cloud |
---|---|---|
Driver Name | databend | databendcloud |
Driver Type | Generic | Generic |
Class Name | com.databend.jdbc.DatabendDriver | com.databend.jdbc.DatabendDriver |
URL Template | jdbc:databend://{user}:{password}@{host}:{port}/{database} | jdbc:databend://{user}:{password}@{host}:{port}/{database} |
Default Port | 8000 | 443 |
Default User | root | cloudapp |
- On the Libraries tab, click Add Artifact, then copy and paste the following to the Dependency Declaration textbox:
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.1.6</version>
</dependency>
- 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.