All Products
Search
Document Center

AnalyticDB:SQL WorkBench/J

Last Updated:Mar 28, 2026

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

  1. 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.
  2. In the Manage Drivers dialog box, select MySQL as the driver, add the JAR file for the driver, and then click OK.

    Create a connection

  3. Choose File > Connect window. In the Select Connection Profile dialog box, configure the following parameters.

    ParameterDescription
    New profileA name for the connection. Use a descriptive name to identify the connection easily.
    DriverSelect MySQL.
    URLThe 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.
    UsernameThe username for the account used to connect to the cluster. Both privileged accounts and standard accounts are supported.
    PasswordThe password for the account.

    Configure parameters

  4. 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.