在 DbVisualizer 中连接 ClickHouse
启动或下载 DbVisualizer
可从 https://www.dbvis.com/download/ 下载 DbVisualizer
1. 收集连接信息
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:

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

If you are using self-managed ClickHouse, the connection details are set by your ClickHouse administrator.
2. 内置 JDBC 驱动管理
DbVisualizer 内置了最新的 ClickHouse JDBC 驱动程序。它提供完整的 JDBC 驱动管理功能,可使用驱动程序的最新发行版本以及历史版本。

3. 连接到 ClickHouse
要使用 DbVisualizer 连接数据库,首先必须创建并配置一个数据库连接。
-
通过 Database->Create Database Connection 创建一个新连接,并在弹出菜单中为你的数据库选择一个驱动程序。
-
会打开该新连接的 Object View 选项卡。
-
在 Name 字段中输入连接名称,并可选地在 Notes 字段中输入该连接的说明。
-
将 Database Type 保持为 Auto Detect。
-
如果在 Driver Type 中选定的驱动程序旁带有绿色对勾,则说明它已可用。如果没有绿色对勾,你可能需要在 Driver Manager 中配置该驱动程序。
-
在其余字段中输入数据库服务器的信息。
-
点击 Ping Server 按钮,验证是否可以与指定地址和端口建立网络连接。
-
如果 Ping Server 的结果显示服务器可达,点击 Connect 以连接到数据库服务器。