SQL WorkBench/J is a DBMS-independent, cross-platform SQL query tool. This topic describes how to connect SQL WorkBench/J to an AnalyticDB for MySQL cluster.
Prerequisites
Before you begin, ensure that you have:
Reviewed the compatibility between SQL WorkBench/J and AnalyticDB for MySQL. For more information, see Compatibility overview.
Installed the MySQL JDBC driver.
Installed SQL WorkBench/J, and added the IP address of the machine running SQL WorkBench/J to the cluster whitelist. For more information, see Configure a whitelist.
(Required for Internet connections) Applied for a public endpoint for the cluster. For more information, see Apply for or release a public endpoint.
Connect SQL WorkBench/J to an AnalyticDB for MySQL cluster
Start SQL WorkBench/J and choose File > Manage Drivers.
The first time you use SQL WorkBench/J, you must add the JDBC driver and its JAR file. For subsequent connections, skip steps 1 and 2.
In the Manage Drivers dialog box, select MySQL as the driver, add the JAR file for the driver, and then click OK.

Choose File > Connect window. In the Select Connection Profile dialog box, configure the following parameters.
Parameter Description New profile A name for the connection. Use a descriptive name to identify the connection easily. Driver Select MySQL. URL The endpoint used to connect to the AnalyticDB for MySQL cluster. You can view the connection information about the cluster on the Cluster Information page of the AnalyticDB for MySQL console. Username The username for the account used to connect to the cluster. Both privileged accounts and standard accounts are supported. Password The password for the account. 
Click Test Connection. After the connection test passes, click OK.
Usage notes
To enable PrepareStatement in SQL WorkBench/J, see Enable PrepareStatement for a client in different programming languages.