Help Center/ Distributed Database Middleware/ FAQs/ DDM Usage/ What Version and Parameters Should I Select?
Updated on 2022-09-16 GMT+08:00

What Version and Parameters Should I Select?

Currently, you cannot connect to DDM using JDBC driver 5.1.46. Versions 5.1.35 to 5.1.45 are recommended.

JDBC driver download address: https://dev.mysql.com/doc/index-connectors.html

Table 1 describes the recommended parameters for the JDBC URL.

Table 1 Parameters

Parameter

Description

Recommended Value

ip:port

Indicates the connection address and port number for connecting to the DDM instance.

Query the connection address on the DDM instance details page.

db_name

Indicates the name of a schema.

Query the schema name on the Schemas page of the DDM instance details page.

loadBalanceAutoCommitStatementThreshold

Indicates the number of statements executed before a reconnection.

  • If the parameter value is set to 5, after five SQL statements (queries or updates) are executed, a reconnection is initiated.
  • A value of 0 indicates a sticky connection, and no reconnection is required.

When automatic submission is disabled (autocommit is set to false), the system waits for the transaction to complete and then determines whether to initiate a reconnection.

5

loadBalanceHostRemovalGracePeriod

Sets the grace period for removing a host from the load balancing connection.

15000

loadBalanceBlacklistTimeout

Sets the time for retaining a service in the global blacklist.

60000

loadBalancePingTimeout

Indicates the time (unit: ms) for waiting for the ping response of each load balancing connection.

5000

retriesAllDown

Indicates the maximum number of polling retries when all connection addresses fail.

If the threshold for retries has been reached but no valid address can be obtained, "SQLException" will be displayed.

10

connectTimeout

Specifies the timeout interval for establishing a socket connection with a database server.

Unit: ms. A value of 0 indicates that connection establishment never times out. This parameter setting is used for JDK 1.4 or later versions.

10000

socketTimeout

Specifies the timeout interval for a socket operation (read and write).

Unit: ms. A value of 0 indicates that a socket operation never times out.

Set this parameter based on your service requirements.