tencent cloud

TDSQL Boundless

Release Notes
Product Introduction
Overview
Scenarios
Product Architecture
Instance Types
Compatibility Notes
Usage specification recommendations
Kernel Features
Kernel Overview
Kernel Version Release Notes
Functionality Features
Performance Features
Billing
Billing Overview
Purchase Method
Pricing Details
Renewal
Overdue Payments
Refund
Getting Started
Creating an Instance
Connect to Instances
User Guide
Data Migration
Data Subscription
Instance Management
Parameter Configuration
Account Management
Security Group
Backup and Restoration
Database Auditing
Tag Management
Use Cases
Technical Evolution and Usage Practices of Online DDL
Lock Mechanism Analysis and Troubleshooting Practices
Data Intelligent Scheduling and Related Practices for Performance Optimization
TDSQL Boundless Selection Guide and Practical Tutorial
Developer Guide
Developer Guide (MySQL Compatibility Mode)
Developer Guide (HBase Compatibility Mode)
Performance Tuning
Performance Tuning Overview
SQL Tuning
DDL Tuning
Performance White Paper
Performance Overview
TPC-C Test
Sysbench Test
API Documentation
History
Introduction
API Category
Making API Requests
Instance APIs
Security Group APIs
Task APIs
Backup APIs
Rollback APIs
Parameter APIs
Database APIs
Data Types
Error Codes
General Reference
System Architecture
SQL Reference
Database Parameter Description
TPC-H benchmark data model reference
Error Code Information
Security and Compliance
FAQs
Agreements
Service Level Agreement
Terms of Service
Privacy Policy
Data Processing And Security Agreement
Contact Us
Glossary

Connect using a database connection pool

PDF
Modo Foco
Tamanho da Fonte
Última atualização: 2026-03-06 18:48:23
The core value of connection pooling: addressing three critical issues arising from direct connections to TDSQL Boundless—performance overhead from frequent connection creation/destruction, uncontrolled connection growth, and the risk of database avalanche.
TDSQL Boundless is fully compatible with MySQL 8.0 protocols and syntax. All JDBC drivers and database connection pools in the MySQL ecosystem can seamlessly connect to TDSQL Boundless.

Prerequisites

Development Environment Dependencies

Driver dependency: All connection pools connect to TDSQL Boundless using the MySQL JDBC driver. TDSQL Boundless does not require a separate driver package; simply use the official MySQL driver.
JDK version: JDK8 and above (JDK8/JDK11 recommended).

Obtain the Standard Connection Information for TDSQL Boundless

Before connecting to TDSQL Boundless, obtain the following core information:
Information Item
Example
Description
JDBC connection URL
jdbc:mysql://tdsql-xxxxxx.dns.tdsql.com:3306/your_db_name
Fully consistent with MySQL.
Username.
tdsql_user
An account independently assigned by TDSQL Boundless, with strict database and table privileges.
Password
TdSql@Pass123
For production environments, complex passwords are recommended, including uppercase and lowercase letters + special characters.
Driver class name
com.mysql.cj.jdbc.Driver (MySQL8.x driver, recommended)
com.mysql.jdbc.Driver (MySQL5.x driver)
-

Core Specifications: TDSQL Boundless Connection Pool General Configuration Parameters

JDBC URL Connection Parameters

Full URL Example

jdbc:mysql://tdsql-******.dns.tdsql.com:3306/your_db_name?
useUnicode=true&
characterEncoding=utf8mb4&
serverTimezone=Asia/Shanghai&
autoReconnect=true&
failOverReadOnly=false&
rewriteBatchedStatements=true&
connectTimeout=3000&
socketTimeout=60000

Detailed Parameter Description

Parameter
Value
Usage
useUnicode
true
Enable Unicode encoding.
characterEncoding
utf8mb4
Supports full Unicode, including emoji characters, to prevent Chinese garbled text.
serverTimezone
Asia/Shanghai
Set the time zone to UTC+8 to resolve time zone exceptions in the MySQL 8.x driver. This is mandatory for TDSQL Boundless clusters deployed across regions.
autoReconnect
true
TDSQL Boundless is a master-slave architecture + high-availability failover. When connection is disconnected / master database switches, it automatically reconnects with write access restored upon reconnection, preventing business errors caused by invalid connections.
failOverReadOnly
false
rewriteBatchedStatements
true
Enable batch SQL rewriting to improve the performance of INSERT/UPDATE batch operations.
connectTimeout
3000
Set the connection establishment timeout to 3 seconds for fast failure, avoiding thread blocking.
socketTimeout
60000
Set the read/write timeout to 60 seconds to prevent connection pool exhaustion caused by slow SQL.

Core Parameters of Connection Pool

Parameter Category
HikariCP Parameters
Druid Parameters
Recommended Value
Description
Connection Pool Size (Minimum Idle Connections)
minimumIdle
minIdle
CPU cores × 2
Defaulting to 5 is sufficient to ensure a fixed number of idle connections in the connection pool, avoiding frequent connection creation.
Maximum Number of Connections
maximumPoolSize
maxActive
Configure as needed.
-
Idle Connection Reclaim Time
idleTimeout
maxEvictableIdleTimeMillis
300000ms (5 minutes)
Reclaim long-idle connections to release database resources.
Connection Wait Timeout (ms)
connectionTimeout
maxWait
3000ms (3 seconds)
When no connections are available in the connection pool, this setting defines the timeout period for business threads to wait, enabling fast failure to prevent thread blocking and accumulation.

Ajuda e Suporte

Esta página foi útil?

comentários