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

连接 QStudio 到 ClickHouse

Community Maintained

QStudio 是一个免费的 SQL GUI,允许执行 SQL 脚本、轻松浏览表格、创建图表和导出结果。它可以在所有操作系统上,与所有数据库一起工作。

QStudio 使用 JDBC 连接到 ClickHouse。

1. 收集您的 ClickHouse 详细信息

QStudio 使用 HTTP(S) 上的 JDBC 连接到 ClickHouse;您需要:

  • 端点
  • 端口号
  • 用户名
  • 密码

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の管理者によって設定されます。

2. 下载 QStudio

QStudio 可以在 https://www.timestored.com/qstudio/download/ 下载。

3. 添加数据库

  • 当您第一次打开 QStudio 时,点击菜单选项 Server->Add Server 或工具栏上的添加服务器按钮。
  • 然后设置详细信息:
  1. 服务器类型: Clickhouse.com
  2. 请注意,主机名称必须包含 https:// 主机: https://abc.def.clickhouse.cloud 端口: 8443
  3. 用户名: default 密码: XXXXXXXXXXX
  4. 点击添加

如果 QStudio 检测到您没有安装 ClickHouse JDBC 驱动程序,它将为您提供下载链接:

4. 查询 ClickHouse

  • 打开查询编辑器并运行查询。您可以通过以下方式运行查询:

  • Ctrl + e - 运行高亮文本

  • Ctrl + Enter - 运行当前行

  • 示例查询:

下一步

请参阅 QStudio 了解 QStudio 的功能,以及 ClickHouse 文档 了解 ClickHouse 的功能。