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

在 DbVisualizer 中连接 ClickHouse

Community Maintained

启动或下载 DbVisualizer

可从 https://www.dbvis.com/download/ 下载 DbVisualizer

1. 收集连接信息

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

Parameter(s)Description
HOST and PORTTypically, the port is 8443 when using TLS or 8123 when not using TLS.
DATABASE NAMEOut of the box, there is a database named default, use the name of the database that you want to connect to.
USERNAME and PASSWORDOut 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:

ClickHouse Cloud service connect button

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

ClickHouse Cloud HTTPS connection details

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

2. 内置 JDBC 驱动管理

DbVisualizer 内置了最新的 ClickHouse JDBC 驱动程序。它提供完整的 JDBC 驱动管理功能,可使用驱动程序的最新发行版本以及历史版本。

DbVisualizer 驱动管理器界面,显示 ClickHouse JDBC 驱动配置

3. 连接到 ClickHouse

要使用 DbVisualizer 连接数据库,首先必须创建并配置一个数据库连接。

  1. 通过 Database->Create Database Connection 创建一个新连接,并在弹出菜单中为你的数据库选择一个驱动程序。

  2. 会打开该新连接的 Object View 选项卡。

  3. Name 字段中输入连接名称,并可选地在 Notes 字段中输入该连接的说明。

  4. Database Type 保持为 Auto Detect

  5. 如果在 Driver Type 中选定的驱动程序旁带有绿色对勾,则说明它已可用。如果没有绿色对勾,你可能需要在 Driver Manager 中配置该驱动程序。

  6. 在其余字段中输入数据库服务器的信息。

  7. 点击 Ping Server 按钮,验证是否可以与指定地址和端口建立网络连接。

  8. 如果 Ping Server 的结果显示服务器可达,点击 Connect 以连接到数据库服务器。

提示

如果在连接数据库时遇到问题,可参阅 修复连接问题 获取一些建议。

深入了解

如需了解 DbVisualizer 的更多信息,请访问 DbVisualizer 文档