Updated on 2025-10-23 GMT+08:00

Preparing the Environment

Obtaining the Driver JAR Package

  • MySQL Connector/J driver has been downloaded, for example, mysql-connector-java-5.1.49.jar, from the MySQL official website. (This section uses this driver as an example.)
  • MySQL Connector/J of 5.1.47 or later is supported.

Installing the Java environment

Preparing for the installation: The JDK 1.8 software package must be configured on the client. JDK supports multiple platforms such as Windows and Linux. The following uses Windows as an example to describe the configuration method:

  1. Enter java -version in the MS-DOS window (command prompt in Windows) to check the JDK version. Ensure that the JDK version is JDK1.8. If JDK is not installed, download the installation package from the official website and install it.
  2. Configure the system environment variables.

    1. Right-click My computer and choose Properties.
    2. In the System window, click Advanced system settings in the navigation pane.
    3. In the System Properties dialog box, click Environment Variables on the Advanced tab page.
    4. In the System variables area of the Environment Variables dialog box, click New or Edit to configure system variables. For details about the variables, see Table 1.
      Table 1 Variables

      Variable

      Operation

      Variable Value

      JAVA_HOME

      • If the variable exists, click Edit.
      • If the variable does not exist, click New.

      Specifies the Java installation directory.

      Example: C:\Program Files\Java\jdk1.8.0_131

      Path

      Click Edit.

      • If JAVA_HOME is configured, add %JAVA_HOME%\bin before the variable value.
      • If JAVA_HOME is not configured, add the following full Java installation path before the variable value:

        C:\Program Files\Java\jdk1.8.0_131\bin

      CLASSPATH

      Click New.

      %JAVA_HOME%\lib;%JAVA_HOME%\lib\tools.jar

Adding Client IP Addresses to the Database Whitelist

Add client IP addresses to the database whitelist. Contact an administrator to perform this operation.

Setting Compatible Parameters

  1. Configure the TCP port number for protocol listening and set the GUC parameter plat_compat_server_port to a proper port number.
  2. If RSA is used, set the GUC parameter plat_compat_allow_public_key_retrieval to on.
  3. Set the GUC parameter m_format_dev_version to s2.