tencent cloud

Tencent Cloud DataBuddy

TDSQL-C MySQL Data Source

Baixar
Modo Foco
Tamanho da Fonte
Última atualização: 2026-10-09 16:09:52
Traduzido por IA

Overview

TDSQL-C MySQL is a cloud-native relational database independently developed by Tencent Cloud. It is 100% compatible with MySQL and provides high throughput and massive distributed storage. DataBuddy data ingestion supports using TDSQL-C MySQL as a source for real-time and offline synchronization. This document describes its connection configuration, supported capabilities, and common issues.

Supported Versions

Type
Supported Version
TDSQL-C MySQL
5.7,8.0
JDBC Driver
8.0.21

Read Capability

Capability
Offline read
Real-time full database read
Sharded database and table read
Supported
✓
✓
✓
For a complete comparison of data source capabilities, see Supported Data Sources and Read Capabilities.

Use Limits

Real-Time Sync Limitations

Limit
Description
Binlog format
Only ROW is supported.
binlog_row_image
Must be set to FULL
Binlog retention period
Retain for at least 72 hours.
Table without primary key
Tables without primary keys cannot guarantee exactly-once semantics.
XA transaction
XA ROLLBACK is not supported.
Read-only standby database
Reading is not supported due to stability and compatibility issues.
Stored procedures and materialized views
Reading is not supported.
SET type
Real-time synchronization is not supported.

Offline Sync Limitations

Limit
Description
Concurrency for Sharded Table Synchronization
When multiple tables are split into a single table during synchronization, the task concurrency must be greater than the number of tables.
Stored Procedure
Reading is not supported.

Supported Field Types

For complete field types, see MySQL official documentation.
Field Type
Offline read
Real-time read
TINYINT / TINYINT UNSIGNED
✅
✅
SMALLINT / MEDIUMINT / INT / BIGINT (including UNSIGNED)
✅
✅
FLOAT / DOUBLE / DECIMAL / NUMERIC
✅
✅
REAL
❌
✅
CHAR / VARCHAR / TEXT Series
✅
✅
JSON
✅
✅
BINARY / VARBINARY / BLOB Series
✅
✅
DATE / TIME / DATETIME / TIMESTAMP / YEAR
✅
✅
BIT / BOOL / BOOLEAN / ENUM
✅
✅
SET
✅
❌
GEOMETRY / POINT
❌
✅
Spatial types such as LINESTRING / POLYGON / MULTIPOINT
❌
❌
TINYINT(1) is mapped to BOOLEAN by default. You can change it to TINYINT in advanced settings.

Supported DML/DDL for Real-Time Sync

DML

Operation
Whether Supported
INSERT / DELETE / UPDATE
✅

DDL

Operation
Whether Supported
Supported syntax examples
Add column (ADD COLUMN)
✅
ALTER TABLE t ADD col TYPE [FIRST | AFTER col]
Drop column (DROP COLUMN)
✅
ALTER TABLE t DROP [COLUMN] col
Rename column (RENAME / CHANGE COLUMN)
✅
ALTER TABLE t CHANGE old new TYPE
Modify column type (MODIFY COLUMN)
✅
ALTER TABLE t MODIFY col TYPE
Add table (CREATE TABLE)
✅
CHECK and Temporary tables are not supported.
Rename table / Delete table / Clear table
❌

DDL change response takes effect only during the incremental phase. For high-risk operations such as dropping or renaming tables, the destination typically does not support automatic response.

Prerequisites

1. Configuring Account Permissions

Offline synchronization:
CREATE USER 'wedata_user'@'%' IDENTIFIED BY 'your_password';
GRANT SELECT ON your_database.* TO 'wedata_user'@'%';
FLUSH PRIVILEGES;
Real-time synchronization:
CREATE USER 'wedata_cdc_user'@'%' IDENTIFIED BY 'your_password';
GRANT SELECT, SHOW DATABASES, REPLICATION SLAVE, REPLICATION CLIENT
ON *.* TO 'wedata_cdc_user'@'%';
FLUSH PRIVILEGES;
After scan.incremental.snapshot.enabled is enabled, the RELOAD privilege is no longer required.

2. Binlog Configuration (Real-Time Sync Only)

Binlog is enabled by default for TDSQL-C MySQL. In the console, go to Parameter Settings and confirm:
binlog_format = ROW
binlog_row_image = FULL
GTID is enabled by default and cannot be disabled.
After modifying the parameters, restart the instance as prompted in the console.

Creating a Data Source

Operation Steps

1. Log in to the DataBuddy console.
2. Switch to the target region and Workspace at the top.
3. Go to Data Integration > Task Management > Data Source Management (or Platform Management > Data Source Management).
4. Click Add Data Source and select TDSQL-C MySQL.
5. Enter the connection configuration and authentication information. For details, see Parameter Description.
6. Click Test Connection (see Data Source Connectivity Test).
7. After the test passes, click Save or Save & Create Task.

Parameter Description

Parameter
Description
Required
Default Value
Data Source Name
Unique identifier of the data source within the workspace
Yes
-
Connection Method
String connection (JDBC URL) / Tencent Cloud instance
Yes
Tencent Cloud Instance
JDBC URL
Connection string in string connection mode, in the format jdbc:mysql://host:port/database
Required for string connection
—
Region and Instance
Required for Tencent Cloud instance mode
Required for Tencent Cloud instance
—
Username.
Database connection account
Yes
—
Password
Database connection password (SSM credential hosting supported)
Yes
—
Data Source Version
5.7
Yes
—
Advanced Parameters
Connection-level extended parameters
No
—

Using in Data Ingestion Tasks

Real-Time Full-Database and Sharded Database/Table Sync

Configuration Item
Description
Source Table Scope
Specified tables (only selected tables are synchronized; new tables require a restart) / regex matching (specify database name + table name regex; new tables that match the rule are automatically added).
Read Mode
Full + incremental / Incremental only
Subscription Type
You can select INSERT / UPDATE / DELETE, and at least one must be retained.
gh-ost Synchronization
Whether to synchronize temporary tables generated by gh-ost online DDL

Offline Single Table Sync

Configuration Item
Description
Data source.
Configured MySQL data source
Database / Table
Supports exact specification and regex matching. Table names support ranges such as table_[0-99]
Split Key
Supports integer fields only; primary key or indexed columns recommended; avoid COLLATE columns.
Filtering Condition
Standard WHERE syntax, supports time parameters (such as gmt_create > $bizdate).

Best Practices

Account Permission Minimization: Use a dedicated account and grant only the necessary permissions.
Binlog Retention Period: at least 72 hours. A longer period is recommended for full synchronization of large tables.
Split Key Selection: Prefer the primary key or an index column.
Network Connectivity: Use a private network connection whenever possible.

FAQs

Q: server-id Conflict Error?

Multiple synchronization tasks used the same server-id. The system now generates server-id randomly. If an old task has explicitly configured server-id in its advanced parameters, delete it.

Q: Binlog File Purged Error?

Increase the Binlog retention period, or optimize job performance to accelerate consumption.

Q: Connection reset Error?

A: Network issue or job backpressure. You can increase slave_net_timeout = 120 and optimize parallelism and memory.

Q:JobManager OOM?

A: Increase the JobManager CU and adjust the advanced parameter scan.incremental.snapshot.chunk.size (default: 8096).

Q: Is gh-ost Online DDL Supported?

A: Yes. After you enable the gh-ost synchronization switch, the system monitors changes to *_gho temporary tables. You can also configure a regular expression for shadow tables.

References

Ajuda e Suporte

Esta página foi útil?

comentários