|
2 | 2 | title: DBeaver
|
3 | 3 | ---
|
4 | 4 |
|
| 5 | +import StepsWrap from '@site/src/components/StepsWrap'; |
| 6 | +import StepContent from '@site/src/components/Steps/step-content'; |
| 7 | + |
5 | 8 | [DBeaver](https://dbeaver.com/) supports connecting to Databend using a built-in driver categorized under **Analytical**, available starting from **version 24.3.1**.
|
6 | 9 |
|
7 | 10 | 
|
8 | 11 |
|
| 12 | +## Prerequisites |
| 13 | + |
| 14 | +- DBeaver 24.3.1 or later version installed |
| 15 | +- For self-hosted Databend: [Docker](https://www.docker.com/) installed (if using Docker deployment) |
| 16 | + |
9 | 17 | ## User Authentication
|
10 | 18 |
|
11 | 19 | If you are connecting to a self-hosted Databend instance, you can use the admin users specified in the [databend-query.toml](https://github.com/databendlabs/databend/blob/main/scripts/distribution/configs/databend-query.toml) configuration file, or you can connect using an SQL user created with the [CREATE USER](/sql/sql-commands/ddl/user/user-create-user) command.
|
12 | 20 |
|
13 | 21 | For connections to Databend Cloud, you can use the default `cloudapp` user or an SQL user created with the [CREATE USER](/sql/sql-commands/ddl/user/user-create-user) command. Please note that the user account you use to log in to the [Databend Cloud console](https://app.databend.com/) cannot be used for connecting to Databend Cloud.
|
14 | 22 |
|
15 |
| -## Tutorials |
| 23 | +## Connecting to Self-Hosted Databend |
| 24 | + |
| 25 | +<StepsWrap> |
| 26 | +<StepContent number="1"> |
| 27 | + |
| 28 | +### Start Databend (Docker) |
| 29 | + |
| 30 | +Run the following command to launch a Databend instance: |
| 31 | + |
| 32 | +:::note |
| 33 | +If no custom values for `QUERY_DEFAULT_USER` or `QUERY_DEFAULT_PASSWORD` are specified when starting the container, a default `root` user will be created with no password. |
| 34 | +::: |
| 35 | + |
| 36 | +```bash |
| 37 | +docker run -d --name databend \ |
| 38 | + -p 3307:3307 -p 8000:8000 -p 8124:8124 -p 8900:8900 \ |
| 39 | + datafuselabs/databend:nightly |
| 40 | +``` |
| 41 | + |
| 42 | +</StepContent> |
| 43 | +<StepContent number="2"> |
| 44 | + |
| 45 | +### Configure Connection |
| 46 | + |
| 47 | +1. In DBeaver, go to **Database** > **New Database Connection** to open the connection wizard, then select **Databend** under the **Analytical** category. |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | +2. Enter `root` for the **Username** (or your configured username). |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | +3. Click **Test Connection** to verify the connection. If this is your first time connecting to Databend, you will be prompted to download the driver. Click **Download** to proceed. |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | +Once the download is complete, the test connection should succeed: |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | +</StepContent> |
| 64 | +</StepsWrap> |
| 65 | + |
| 66 | +## Connecting to Databend Cloud |
| 67 | + |
| 68 | +<StepsWrap> |
| 69 | +<StepContent number="1"> |
| 70 | + |
| 71 | +### Obtain Connection Information |
| 72 | + |
| 73 | +Log in to Databend Cloud to obtain connection information. For more information, see [Connecting to a Warehouse](/guides/cloud/using-databend-cloud/warehouses#connecting). |
| 74 | + |
| 75 | + |
| 76 | + |
| 77 | +:::note |
| 78 | +If your `user` or `password` contains special characters, you need to provide them separately in the corresponding fields (e.g., the `Username` and `Password` fields in DBeaver). In this case, Databend will handle the necessary encoding for you. However, if you're providing the credentials together (e.g., as `user:password`), you must ensure that the entire string is properly encoded before use. |
| 79 | +::: |
| 80 | + |
| 81 | +</StepContent> |
| 82 | +<StepContent number="2"> |
| 83 | + |
| 84 | +### Configure Connection |
| 85 | + |
| 86 | +1. In DBeaver, go to **Database** > **New Database Connection** to open the connection wizard, then select **Databend** under the **Analytical** category. |
| 87 | + |
| 88 | + |
| 89 | + |
| 90 | +2. In the **Main** tab, enter the **Host**, **Port**, **Username**, and **Password** based on the connection information obtained in the previous step. |
| 91 | + |
| 92 | + |
| 93 | + |
| 94 | +3. In the **Driver properties** tab, enter the **Warehouse** name based on the connection information obtained in the previous step. |
| 95 | + |
| 96 | + |
| 97 | + |
| 98 | +4. In the **SSL** tab, select the **Use SSL** checkbox. |
| 99 | + |
| 100 | + |
| 101 | + |
| 102 | +5. Click **Test Connection** to verify the connection. If this is your first time connecting to Databend, you will be prompted to download the driver. Click **Download** to proceed. Once the download is complete, the test connection should succeed: |
| 103 | + |
| 104 | + |
16 | 105 |
|
17 |
| -- [Connecting to Databend using DBeaver](/tutorials/connect/connect-to-databend-dbeaver) |
18 |
| -- [Connecting to Databend Cloud using DBeaver](/tutorials/connect/connect-to-databendcloud-dbeaver) |
| 106 | +</StepContent> |
| 107 | +</StepsWrap> |
0 commit comments