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

> DataGrip is a database IDE that supports ClickHouse out of the box.

# Connecting DataGrip to ClickHouse

export const CommunityMaintainedBadge = () => {
  return <div className="CommunityMaintainedBadge">
            <div className="CommunityMaintainedIcon">
            <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="currentColor" viewBox="0 0 256 256">
                <path d="M244.8,150.4a8,8,0,0,1-11.2-1.6A51.6,51.6,0,0,0,192,128a8,8,0,0,1-7.37-4.89,8,8,0,0,1,0-6.22A8,8,0,0,1,192,112a24,24,0,1,0-23.24-30,8,8,0,1,1-15.5-4A40,40,0,1,1,219,117.51a67.94,67.94,0,0,1,27.43,21.68A8,8,0,0,1,244.8,150.4ZM190.92,212a8,8,0,1,1-13.84,8,57,57,0,0,0-98.16,0,8,8,0,1,1-13.84-8,72.06,72.06,0,0,1,33.74-29.92,48,48,0,1,1,58.36,0A72.06,72.06,0,0,1,190.92,212ZM128,176a32,32,0,1,0-32-32A32,32,0,0,0,128,176ZM72,120a8,8,0,0,0-8-8A24,24,0,1,1,87.24,82a8,8,0,1,0,15.5-4A40,40,0,1,0,37,117.51,67.94,67.94,0,0,0,9.6,139.19a8,8,0,1,0,12.8,9.61A51.6,51.6,0,0,1,64,128,8,8,0,0,0,72,120Z"></path>
            </svg>
        </div>
            Community Maintained
        </div>;
};

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

<h2 id="start-or-download-datagrip">
  Start or download DataGrip
</h2>

DataGrip is available at [https://www.jetbrains.com/datagrip/](https://www.jetbrains.com/datagrip/)

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

To connect to ClickHouse with HTTP(S) you need this information:

| Parameter(s)              | Description                                                                                                    |
| ------------------------- | -------------------------------------------------------------------------------------------------------------- |
| `HOST` and `PORT`         | Typically, the port is 8443 when using TLS or 8123 when not using TLS.                                         |
| `DATABASE NAME`           | Out of the box, there is a database named `default`, use the name of the database that you want to connect to. |
| `USERNAME` and `PASSWORD` | Out of the box, the username is `default`. Use the username appropriate for your use case.                     |

The details for your ClickHouse Cloud service are available in the ClickHouse Cloud console.
Select a service and click **Connect**:

<Image img="https://mintcdn.com/private-7c7dfe99-mintlify-8c05c8a2/Yn9Ty-XK2U8NF3YT/images/_snippets/cloud-connect-button.png?fit=max&auto=format&n=Yn9Ty-XK2U8NF3YT&q=85&s=b686c12ce9557c68eca40985010c95e0" size="md" alt="ClickHouse Cloud service connect button" border width="998" height="932" data-path="images/_snippets/cloud-connect-button.png" />

Choose **HTTPS**. Connection details are displayed in an example `curl` command.

<Image img="https://mintcdn.com/private-7c7dfe99-mintlify-8c05c8a2/Yn9Ty-XK2U8NF3YT/images/_snippets/connection-details-https.png?fit=max&auto=format&n=Yn9Ty-XK2U8NF3YT&q=85&s=8791490ebb8e7ab70bff1b5b8b3e39e8" size="md" alt="ClickHouse Cloud HTTPS connection details" border width="1320" height="1184" data-path="images/_snippets/connection-details-https.png" />

If you're using self-managed ClickHouse, the connection details are set by your ClickHouse administrator.

<h2 id="2-load-the-clickhouse-driver">
  2. Load the ClickHouse driver
</h2>

1. Launch DataGrip, and on the **Data Sources** tab in the **Data Sources and Drivers** dialog, click the **+** icon

<Image img="https://mintcdn.com/private-7c7dfe99-mintlify-8c05c8a2/EtZF01T1n3kdpgn9/images/integrations/sql-clients/datagrip-5.png?fit=max&auto=format&n=EtZF01T1n3kdpgn9&q=85&s=227c8cd1c7b6dc3f17acb08aefaab88c" size="lg" border alt="DataGrip Data Sources tab with + icon highlighted" width="859" height="283" data-path="images/integrations/sql-clients/datagrip-5.png" />

Select **ClickHouse**

<Tip>
  As you establish connections the order changes, ClickHouse may not be at the top of your list yet.
</Tip>

<Image img="https://mintcdn.com/private-7c7dfe99-mintlify-8c05c8a2/EtZF01T1n3kdpgn9/images/integrations/sql-clients/datagrip-6.png?fit=max&auto=format&n=EtZF01T1n3kdpgn9&q=85&s=572181645280ff30ab2492b72c9c92b2" size="sm" border alt="DataGrip selecting ClickHouse from the data sources list" width="287" height="141" data-path="images/integrations/sql-clients/datagrip-6.png" />

* Switch to the **Drivers** tab and load the ClickHouse driver

  DataGrip doesn't ship with drivers in order to minimize the download size.  On the **Drivers** tab
  Select **ClickHouse** from the **Complete Support** list, and expand the **+** sign.  Choose the **Latest stable** driver from the **Provided Driver** option:

<Image img="https://mintcdn.com/private-7c7dfe99-mintlify-8c05c8a2/EtZF01T1n3kdpgn9/images/integrations/sql-clients/datagrip-1.png?fit=max&auto=format&n=EtZF01T1n3kdpgn9&q=85&s=7fdbf9501cbab7506928d604acd444b0" size="lg" border alt="DataGrip Drivers tab showing ClickHouse driver installation" width="1277" height="545" data-path="images/integrations/sql-clients/datagrip-1.png" />

<h2 id="3-connect-to-clickhouse">
  3. Connect to ClickHouse
</h2>

* Specify your database connection details, and click **Test Connection**.
  In step one you gathered your connection details - fill in the host URL, port, username, password, and database name, then test the connection.

<Tip>
  Enter only the hostname in the **Host** field (e.g., `your-host.clickhouse.cloud`) without any protocol prefix like `https://`.

  For ClickHouse Cloud connections, you must add `?ssl=true` to the **URL** field below the host. The complete JDBC URL should look like:

  `jdbc:clickhouse://your-host.clickhouse.cloud:8443/default?ssl=true`

  ClickHouse Cloud requires SSL encryption for all connections. Without the `?ssl=true` parameter, you'll see "Connection reset" errors even with correct credentials.

  For more details on JDBC URL settings, please refer to the [ClickHouse JDBC driver](https://github.com/ClickHouse/clickhouse-java) repository.
</Tip>

<Image img="https://mintcdn.com/private-7c7dfe99-mintlify-8c05c8a2/EtZF01T1n3kdpgn9/images/integrations/sql-clients/datagrip-7.png?fit=max&auto=format&n=EtZF01T1n3kdpgn9&q=85&s=8caa7d40334adeb02d861f05f4125fa4" border alt="DataGrip connection details form with ClickHouse settings" width="3836" height="2106" data-path="images/integrations/sql-clients/datagrip-7.png" />

<h2 id="learn-more">
  Learn more
</h2>

Find more information about DataGrip visit the DataGrip documentation.
