Navicat (full name Navicat Premium) is a powerful database management tool widely used for database development, management, and maintenance. This article describes how to use Navicat to connect to Lakehouse via the MySQL protocol.
Prerequisites
-
Please refer to the Navicat official website. If already installed, skip this step.
-
Use the MySQL protocol to connect. Currently, you need to reset your password, even for newly created accounts. This is because MySQL 5.x uses the
authentication plugin, while Lakehouse needs to store the MySQL encryption algorithm. Currently, Lakehouse only saves the MySQL key encryption algorithm when the password is changed. You can reset the password to the same value as before to avoid affecting other task connections.mysql_native_password -
Set a compute cluster for the user. Since the MySQL protocol does not provide a way to pass the cluster setting, users can use SQL commands to assign a default compute cluster to a user. This way, the designated cluster will be used when connecting via MySQL.
-
-
Prepare the username. When using the MySQL protocol to connect, the address can only accept a single URL and cannot concatenate the Lakehouse instance_name and workspace_name. Therefore, you need to concatenate the instance_name and workspace_name into the username.
- The username format is as follows:
-
- Obtain instance_name: Get the JDBC connection string from the workspace page. For example, in
,jdbc:clickzetta://``demoinstance.cn-shanghai-alicloud.api.singdata.com/quick_start?virtualCluster=default
is the instance_name.jnsxwfyr - Obtain workspace_name: The name of the workspace.
Connecting to Lakehouse
-
Click Connection -> Select MySQL
-
Fill in the configuration information as follows:
| Field | Description |
|---|---|
| Connection Name | Custom connection name, e.g.: clickzetta_lakehouse_mysql |
| Host | Connection address for each region. See Connect using MySQL protocol for details |
| Port | Optional. Default: 3306 |
| Username | login_account_name@instance_name.workspace_name |
| Password | Password for the login account |
