跳到主要内容
跳到主要内容

连接 DataGrip 到 ClickHouse

Community Maintained

1. 启动或下载 DataGrip

DataGrip 可在 https://www.jetbrains.com/datagrip/ 获取。

2. 收集连接详细信息

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

  • The HOST and PORT: typically, the port is 8443 when using TLS or 8123 when not using TLS.

  • The DATABASE NAME: out of the box, there is a database named default, use the name of the database that you want to connect to.

  • The 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 the service that you will connect to and click Connect:

Choose HTTPS, and the details are available in an example curl command.

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


ClickHouseにHTTP(S)で接続するには、次の情報が必要です:

  • HOSTとPORT: 通常、ポートはTLSを使用する場合は8443、TLSを使用しない場合は8123です。

  • DATABASE NAME: デフォルトでは、defaultという名前のデータベースがあります。接続したいデータベースの名前を使用してください。

  • USERNAMEとPASSWORD: デフォルトでは、ユーザー名はdefaultです。ご利用のケースに適したユーザー名を使用してください。

ClickHouse Cloudサービスの詳細はClickHouse Cloudコンソールで確認できます。接続するサービスを選択し、Connectをクリックします:

HTTPSを選択すると、詳細が例のcurlコマンドで提供されます。

セルフマネージドのClickHouseを使用している場合、接続の詳細はClickHouseの管理者によって設定されます。

3. 加载 ClickHouse 驱动

  1. 启动 DataGrip,并在 数据源 标签页的 数据源和驱动程序 对话框中,点击 + 图标

选择 ClickHouse

提示

随着您建立连接,顺序会发生变化,ClickHouse 可能还不在列表的顶部。

  • 切换到 驱动程序 标签页并加载 ClickHouse 驱动

    为了减少下载大小,DataGrip 不附带驱动程序。在 驱动程序 标签页中 从 完全支持 列表中选择 ClickHouse,并展开 + 符号。 从 提供的驱动 选项中选择 最新稳定 驱动:

4. 连接到 ClickHouse

  • 指定您的数据库连接详细信息,然后点击 测试连接

    在第一步中,您收集了连接详细信息,填写主机 URL、端口、用户名、密码和数据库名称,然后测试连接。

    提示

    DataGrip 对话框中的 HOST 项实际上是一个 URL,详见下图。

    有关 JDBC URL 设置的更多详细信息,请参阅 ClickHouse JDBC driver 仓库。

了解更多

有关 DataGrip 的更多信息,请访问 DataGrip 文档。