> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-detect-table-modification.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 = "lg"}) => {
  const normalizedSize = ["sm", "md", "lg"].includes(size) ? size : "lg";
  return <div className={`ch-image-${normalizedSize}`}>
      <Frame>
        <img src={img} alt={alt} />
      </Frame>
    </div>;
};

<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/)

<Steps>
  <Step title="Gather your connection details" id="1-gather-your-connection-details">
    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**:

    <div className="ch-image-md">
      <Frame>
        <img src="https://mintcdn.com/private-7c7dfe99-detect-table-modification/0yJtAU6cqYAQlCWC/images/_snippets/cloud-connect-button.webp?fit=max&auto=format&n=0yJtAU6cqYAQlCWC&q=85&s=2d1e2340e1ddccf3199ca1e41eeba836" alt="ClickHouse Cloud service connect button" width="998" height="932" data-path="images/_snippets/cloud-connect-button.webp" />
      </Frame>
    </div>

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

    <div className="ch-image-md">
      <Frame>
        <img src="https://mintcdn.com/private-7c7dfe99-detect-table-modification/0yJtAU6cqYAQlCWC/images/_snippets/connection-details-https.webp?fit=max&auto=format&n=0yJtAU6cqYAQlCWC&q=85&s=2ea2af378046d5ec87ea8e78de573bc1" alt="ClickHouse Cloud HTTPS connection details" width="1320" height="1184" data-path="images/_snippets/connection-details-https.webp" />
      </Frame>
    </div>

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

  <Step title="Load the ClickHouse driver" id="2-load-the-clickhouse-driver">
    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-detect-table-modification/sWsbrb2bBAr-0f9w/images/integrations/sql-clients/datagrip-5.webp?fit=max&auto=format&n=sWsbrb2bBAr-0f9w&q=85&s=c04d4141384387a326d3e648cc8f0e5c" size="lg" border alt="DataGrip Data Sources tab with + icon highlighted" width="859" height="283" data-path="images/integrations/sql-clients/datagrip-5.webp" />

    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-detect-table-modification/sWsbrb2bBAr-0f9w/images/integrations/sql-clients/datagrip-6.webp?fit=max&auto=format&n=sWsbrb2bBAr-0f9w&q=85&s=a3d1bf8efbc5fac82269a2420ea7a34e" size="sm" border alt="DataGrip selecting ClickHouse from the data sources list" width="287" height="141" data-path="images/integrations/sql-clients/datagrip-6.webp" />

    * 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-detect-table-modification/sWsbrb2bBAr-0f9w/images/integrations/sql-clients/datagrip-1.webp?fit=max&auto=format&n=sWsbrb2bBAr-0f9w&q=85&s=74c2feeea0fcee3388fd32ee5de0faed" size="lg" border alt="DataGrip Drivers tab showing ClickHouse driver installation" width="1277" height="545" data-path="images/integrations/sql-clients/datagrip-1.webp" />
  </Step>

  <Step title="Connect to ClickHouse" id="3-connect-to-clickhouse">
    * 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-detect-table-modification/sWsbrb2bBAr-0f9w/images/integrations/sql-clients/datagrip-7.webp?fit=max&auto=format&n=sWsbrb2bBAr-0f9w&q=85&s=151a9c464f61cd0fe5755e7be8eca3a7" border alt="DataGrip connection details form with ClickHouse settings" width="3836" height="2106" data-path="images/integrations/sql-clients/datagrip-7.webp" />
  </Step>
</Steps>

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

Find more information about DataGrip visit the DataGrip documentation.
