> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-8a08bda2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> DBeaver is a multi-platform database tool.

# Connect DBeaver to ClickHouse

export const PartnerBadge = () => {
  return <div className="PartnerBadge">
            <div className="PartnerBadgeIcon">
                <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
                    <polyline points="12.5 9.5 10 12 6 11 2.5 8.5" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="1" />
                    <polyline points="4.54 4.41 8 3.5 11.46 4.41" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="1" />
                    <path d="M2.15,3.78 L0.55,6.95 A0.5,0.5 0,0,0 0.77,7.62 L2.5,8.5 L4.54,4.41 L2.82,3.55 A0.5,0.5 0,0,0 2.15,3.78 Z" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="1" />
                    <path d="M13.5,8.5 L15.23,7.62 A0.5,0.5 0,0,0 15.45,6.95 L13.85,3.78 A0.5,0.5 0,0,0 13.18,3.55 L11.46,4.41 Z" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="1" />
                    <path d="M11.5,4.5 L9,4.5 L6.15,7.27 A0.5,0.5 0,0,0 6.24,8.05 C7.33,8.74 8.81,8.72 10,7.5 L12.5,9.5 L13.5,8.5" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="1" />
                    <polyline points="7.75 13.5 5.15 12.85 3.5 11.67" stroke="currentColor" strokeLinecap="round" strokeLinejoin="round" strokeWidth="1" />
                </svg>
            </div>
            Partner Integration
        </div>;
};

export const Image = ({img, alt, size}) => {
  return <Frame>
      <img src={img} alt={alt} />
    </Frame>;
};

DBeaver is available in multiple offerings. In this guide [DBeaver Community](https://dbeaver.io/) is used. See the various offerings and capabilities [here](https://dbeaver.com/edition/).  DBeaver connects to ClickHouse using JDBC.

<Note>
  Please use DBeaver version 23.1.0 or above for improved support of `Nullable` columns in ClickHouse.
</Note>

<h2 id="1-gather-your-clickhouse-details">
  1. Gather your ClickHouse details
</h2>

DBeaver uses JDBC over HTTP(S) to connect to ClickHouse; you need:

* endpoint
* port number
* username
* password

<h2 id="2-download-dbeaver">
  2. Download DBeaver
</h2>

DBeaver is available at [https://dbeaver.io/download/](https://dbeaver.io/download/)

<h2 id="3-add-a-database">
  3. Add a database
</h2>

* Either use the **Database > New Database Connection** menu or the **New Database Connection** icon in the **Database Navigator** to bring up the **Connect to a database** dialog:

<Image img="https://mintcdn.com/private-7c7dfe99-mintlify-8a08bda2/ZT-JqiqW9VQfE6CK/images/integrations/sql-clients/dbeaver-add-database.png?fit=max&auto=format&n=ZT-JqiqW9VQfE6CK&q=85&s=b766bbe80acca097d675442552c57dc9" size="md" border alt="Add a new database" width="642" height="385" data-path="images/integrations/sql-clients/dbeaver-add-database.png" />

* Select **Analytical** and then **ClickHouse**:

* Build the JDBC URL. On the **Main** tab set the Host, Port, Username, Password, and Database:

<Image img="https://mintcdn.com/private-7c7dfe99-mintlify-8a08bda2/ZT-JqiqW9VQfE6CK/images/integrations/sql-clients/dbeaver-host-port.png?fit=max&auto=format&n=ZT-JqiqW9VQfE6CK&q=85&s=4f0fe207416f96554dd4f77a4fd3c5d9" size="md" border alt="Set the hostname, port, user, password, and database name" width="650" height="654" data-path="images/integrations/sql-clients/dbeaver-host-port.png" />

* By default the **SSL > Use SSL** property will be unset, if you're connecting to ClickHouse Cloud or a server that requires SSL on the HTTP port, then set **SSL > Use SSL** on:

<Image img="https://mintcdn.com/private-7c7dfe99-mintlify-8a08bda2/ZT-JqiqW9VQfE6CK/images/integrations/sql-clients/dbeaver-use-ssl.png?fit=max&auto=format&n=ZT-JqiqW9VQfE6CK&q=85&s=e416a590e6438cc38abbe8a382c8a8de" size="md" border alt="Enable SSL if required" width="650" height="654" data-path="images/integrations/sql-clients/dbeaver-use-ssl.png" />

* Test the connection:

<Image img="https://mintcdn.com/private-7c7dfe99-mintlify-8a08bda2/ZT-JqiqW9VQfE6CK/images/integrations/sql-clients/dbeaver-test-connection.png?fit=max&auto=format&n=ZT-JqiqW9VQfE6CK&q=85&s=73448faddac90af615cde864d6adfb4d" size="md" border alt="Test the connection" width="650" height="654" data-path="images/integrations/sql-clients/dbeaver-test-connection.png" />

If DBeaver detects that you don't have the ClickHouse driver installed it will offer to download them for you:

<Image img="https://mintcdn.com/private-7c7dfe99-mintlify-8a08bda2/ZT-JqiqW9VQfE6CK/images/integrations/sql-clients/dbeaver-download-driver.png?fit=max&auto=format&n=ZT-JqiqW9VQfE6CK&q=85&s=22262327fe19fb41dc6f40bc350ad93a" size="md" border alt="Download the ClickHouse driver" width="612" height="689" data-path="images/integrations/sql-clients/dbeaver-download-driver.png" />

* After downloading the driver **Test** the connection again:

<Image img="https://mintcdn.com/private-7c7dfe99-mintlify-8a08bda2/ZT-JqiqW9VQfE6CK/images/integrations/sql-clients/dbeaver-test-connection.png?fit=max&auto=format&n=ZT-JqiqW9VQfE6CK&q=85&s=73448faddac90af615cde864d6adfb4d" size="md" border alt="Test the connection" width="650" height="654" data-path="images/integrations/sql-clients/dbeaver-test-connection.png" />

<h2 id="4-query-clickhouse">
  4. Query ClickHouse
</h2>

Open a query editor and run a query.

* Right click on your connection and choose **SQL Editor > Open SQL Script** to open a query editor:

<Image img="https://mintcdn.com/private-7c7dfe99-mintlify-8a08bda2/ZT-JqiqW9VQfE6CK/images/integrations/sql-clients/dbeaver-sql-editor.png?fit=max&auto=format&n=ZT-JqiqW9VQfE6CK&q=85&s=90ec16b503d9a0b3489cafad198747f8" size="md" border alt="Open the SQL editor" width="636" height="162" data-path="images/integrations/sql-clients/dbeaver-sql-editor.png" />

* An example query against `system.query_log`:

<Image img="https://mintcdn.com/private-7c7dfe99-mintlify-8a08bda2/ZT-JqiqW9VQfE6CK/images/integrations/sql-clients/dbeaver-query-log-select.png?fit=max&auto=format&n=ZT-JqiqW9VQfE6CK&q=85&s=89ed73a7ddc55c4158e747c71d7c4000" size="md" border alt="A sample query" width="712" height="316" data-path="images/integrations/sql-clients/dbeaver-query-log-select.png" />

<h2 id="next-steps">
  Next steps
</h2>

See the [DBeaver wiki](https://github.com/dbeaver/dbeaver/wiki) to learn about the capabilities of DBeaver, and the [ClickHouse documentation](/) to learn about the capabilities of ClickHouse.
