This document describes the TDSQL-C for MySQL use limits that you must follow to ensure the stable and secure operation of your cluster.
Engine Limits
The TDSQL-C for MySQL exclusively supports the InnoDB and LibraDB engines.
Naming Limits
|
| The length must be less than 60 characters. It can contain letters, digits, hyphens, underscores, and dots. |
Read-write/read-only instance name | The length must be less than 60 characters. It can contain letters, digits, hyphens, underscores, and dots. |
| The length ranges from 1 to 16 characters. It must be a combination of letters, digits and special characters, which must start with a letter and end with a letter or digit. The special symbols are underscores and dots. It cannot be the same as an existing account name. |
| The length can be up to 60 characters. It must be a combination of lowercase letters, digits, hyphens, and underscores. It must start with a letter and end with a letter or digit. It cannot be the same as an existing database name and cannot be changed after creation. |
Quota Limits
|
| In a single cluster, totally 0 to 15 read-only instances can be created under the TXSQL and LibraDB engines. However, a maximum of 6 read-only instances may utilize the LibraDB engine. |
| Tag keys must be unique. There can be up to 20 tags. A tag can be bound to up to 50 instances at a time. |
Free tier of backup space | TDSQL-C for MySQL backup space currently is free of charge. In the future, a free tier of backup space will be set based on the storage space selected during cluster purchase, and any excessive usage will incur fees. |
| Backups can be retained for 7 (default) to 1,830 days. |
| Logs can be retained for 7 (default) to 1,830 days. |
| A project is defined on a cluster basis, and multiple instances in the same cluster belong to the same project. |
Operation Limits
|
| Cluster switch will be required after version upgrade is completed (that is, the database may be disconnected for seconds). We recommend that you use applications configured with automatic reconnection feature and conduct the switch during the instance maintenance time. If the number of tables in a single instance exceeds one million, upgrade may fail and database monitoring may be affected. Make sure that the number of tables in a single instance is below one million. The kernel minor version cannot be downgraded once upgraded. |
| When the source node fails, TDSQL-C for MySQL will switch to a replica node. As a disconnection for less than 30 seconds will occur during the switch, make sure that your business has an automatic reconnection mechanism. |
| Switching the network may cause all of the instance's private IPs to change. The system will automatically assign new IPs, so you need to modify the instance IPs on the client promptly. The original IPs will expire after 24 hours by default. The expiration time can be customized during the network switch. If it is set to zero, the original IPs will be repossessed immediately after the network switch. When switching the network, you can only select a new VPC and subnet in the same region and AZ where the instance resides. |
| The storage space in the monthly subscription billing mode is as purchased. The compute instance specification has a storage upper limit. If you need more storage space, upgrade the specification. |
| We recommend that you back up important data to avoid data loss before restoring data. You can do so through rollback or cluster cloning. |
| TDSQL-C for MySQL supports fast in-place configuration upgrade or downgrade, and a momentary disconnection may occur in special cases. Make sure that your business has an automatic reconnection mechanism. We recommend that you perform this operation during off-peak hours. |
Keywords/Reserved Words Limits
A keyword refers to a word that has a meaning in a SQL statement. A reserved word refers to a certain word in a keyword (such as SELECT, DELETE, and BIGINT) that is reserved in the corresponding version of the database. These reserved words/keywords require special processing (such as by adding quotation marks) before they can be used as identifiers like table name and column name; otherwise, errors will occur. In contrast, non-reserved words/keywords can be directly used as identifiers.
The keywords and reserved words in TDSQL-C for MySQL are basically the same as those in MySQL as listed in Keywords and Reserved Words. In addition, TDSQL-C for MySQL has the following additional reserved words and keywords:
CLUSTER
THREADPOOL_SYM
Connection Count Limits
The maximum number of connections for TDSQL-C for MySQL is determined by the system variable max_connections. If the number of instance connections exceeds max_connections, no new connections can be established.
The default number of connections can be viewed in Parameter Settings on the Cluster Management page after you click the cluster ID in the TDSQL-C for MySQL console. Users can adjust the value of max_connections as needed. However, the more connections, the more system resources are consumed. If the number of connections exceeds the actual system's load capacity, it will inevitably affect the quality of system services.
For more information about max_connections, see the MySQL official documentation. Limits of Clients Connecting to Cloud Databases
We recommend using the MySQL client and lib library that are built into the Cloud Virtual Machine (CVM) system to connect to cloud database instances.
Slow Log
Developers using Windows CVM cannot directly obtain slow logs. If needed, submit a ticket to contact us for obtaining slow log files. Cloud Database Binlog Retention Period
TDSQL-C for MySQL binlog files can be retained for 7 to 1,830 days, with the default being 7 days (click the cluster ID to enter Backup Management > Log Backup Settings where you can configure the retention period).
If the binlog retention period is too long or the binlog grows too quickly, it will lead to an increase in backup space. Once the backup space exceeds the system's complimentary space, additional backup space fees will be incurred.
Character Set
Note:
Starting from the official MySQL 8.0.29, the original UTF8 encoding format has been changed to UTF8MB4.
For database version MySQL 5.7, the default character set encoding format is UTF8.
For database version MySQL 8.0, the default character set encoding format includes two scenarios:
Scenario 1: For official MySQL versions earlier than 8.0.29, the default character set encoding format is UTF8.
Scenario 2: For official MySQL 8.0.29 and later versions, the default character set encoding format is UTF8MB4. For detailed changes, refer to the MySQL official documentation. Although cloud databases support the default character set encoding settings, we recommend that you explicitly specify the table encoding when creating a table and specify the connection encoding when establishing a connection. In this way, your application will have better portability.
For character set resources, see the MySQL official documentation. You can modify the character set through SQL or the TDSQL-C for MySQL console.
Modifying the character set through SQL
1. Run the following SQL statements to change the default character set for a cloud database instance:
SET @@global.character_set_client = utf8;
SET @@global.character_set_results = utf8;
SET @@global.character_set_connection = utf8;
SET @@global.character_set_server = utf8;
After the statements are run, the @@global.character_set_server variable will be automatically synchronized to the local file within about 10 minutes for persistence (the other three variables will not be synchronized to the local file) and will retain the set value after migration or restart.
2. Run the following statements to change the character set encoding for the current connection:
SET @@session.character_set_client = utf8;
SET @@session.character_set_results = utf8;
SET @@session.character_set_connection = utf8;
Or
3. For PHP programs, you can configure the character set encoding for the current connection by using the following function:
bool mysqli::set_charset(string charset);
Or
bool mysqli_set_charset(mysqli link, string charset);
4. For Java programs, you can configure the character set encoding for the current connection as shown below:
jdbc:mysql://localhost:3306/dbname?useUnicode=true&characterEncoding=UTF-8
Modifying the character set in the TDSQL-C for MySQL console
1. Log in to the TDSQL-C for MySQL console. In the left-side cluster list, click the target cluster to enter the cluster management page. 2. In the section of cluster details, find the target instance, and click Details next to the instance ID to enter the instance details page. Click the modify icon next to Character Set to make changes.
Operation Limits
1. Do not modify the existing default account information and permissions for the TDSQL-C for MySQL cluster. Otherwise, some cluster services may become unavailable.
2. InnoDB is recommended for creating databases and tables, so that the instances can better support a large number of concurrent access requests.
Database Account Permissions
TDSQL-C for MySQL does not provide the super user permission. Parameters that can be modified by users are subject to the actual console. Log in to the TDSQL-C for MySQL console, find the target cluster, and click the cluster ID to enter the Cluster Management page. Go to Parameter Settings to view the range of parameters that can be modified. Network Selection
We recommend that you use Virtual Private Cloud (VPC). In the VPC, you can define IP range segmentation, IP addresses, and routing policies as needed. Compared with classic networks, VPC is more suitable for scenarios where custom network configurations are required. For the comparison of VPC and classic networks, see Managing Networks.
Was this page helpful?