tencent cloud

TDSQL-C for MySQL

Release Notes and Announcements
Release Notes
Product Announcements
Beginner's Guide
Product Introduction
Overview
Strengths
Use Cases
Architecture
Product Specifications
Instance Types
Product Feature List
Database Versions
Regions and AZs
Common Concepts
Use Limits
Suggestions on Usage Specifications
Kernel Features
Kernel Overview
Kernel Version Release Notes
Optimized Kernel Version
Functionality Features
Performance Features
Security Features
Stability Feature
Analysis Engine Features
Inspection and Repair of Kernel Issues
Purchase Guide
Billing Overview
Product Pricing
Creating Cluster
Specification Adjustment Description
Renewal
Payment Overdue
Refund
Change from Pay-as-You-Go to Yearly/Monthly Subscription
Change from Pay-as-You-Go to Serverless Billing
Value-Added Services Billing Overview
Viewing Billing Statements
Getting Started
Database Audit
Overview
Viewing Audit Instance List
Enabling Audit Service
Viewing Audit Logs
Log Shipping
Post-Event Alarm Configuration
Modifying Audit Rule
Modifying Audit Service
Disabling Audit Service
Audit Rule Template
Viewing Audit Task
Authorizing Sub-User to Use Database Audit
Serverless Service
Serverless Introduction
Creating and Managing a Serverless Cluster
Elastic Scaling Management Tool
Serverless Resource Pack
Multi-AZ Deployment
Configuration Change
FAQs
Serverless Cost Estimator
Operation Guide
Operation Overview
Switching Cluster Page View in Console
Database Connection
Instance Management
Configuration Adjustment
Instance Mode Management
Cluster Management
Scaling Instance
Database Proxy
Account Management
Database Management
Database Management Tool
Parameter Configuration
Multi-AZ Deployment
GD
Backup and Restoration
Operation Log
Data Migration
Parallel Query
Columnar Storage Index (CSI)
Analysis Engine
Database Security and Encryption
Monitoring and Alarms
Basic SQL Operations
Connecting to TDSQL-C for MySQL Through SCF
Tag
Practical Tutorial
Classified Protection Practice for Database Audit of TDSQL-C for MySQL
Upgrading Database Version from MySQL 5.7 to 8.0 Through DTS
Usage Instructions for TDSQL-C MySQL
New Version of Console
Implementing Multiple RO Groups with Multiple Database Proxy Connection Addresses
Strengths of Database Proxy
Selecting Billing Mode for Storage Space
Creating Remote Disaster Recovery by DTS
Creating VPC for Cluster
Data Rollback
Solution to High CPU Utilization
How to Authorize Sub-Users to View Monitoring Data
White Paper
Security White Paper
Performance White Paper
Troubleshooting
Connection Issues
Performance Issues
API Documentation
History
Introduction
API Category
Making API Requests
Instance APIs
Multi-Availability Zone APIs
Other APIs
Audit APIs
Database Proxy APIs
Backup and Recovery APIs
Parameter Management APIs
Billing APIs
serverless APIs
Resource Package APIs
Account APIs
Performance Analysis APIs
Data Types
Error Codes
FAQs
Basic Concepts
Purchase and Billing
Compatibility and Format
Connection and Network
Features
Console Operations
Database and Table
Performance and Log
Database Audit
Between TDSQL-C for MySQL and TencentDB for MySQL
Service Agreement
Service Level Agreement
Terms of Service
TDSQL-C Policy
Privacy Policy
Data Privacy and Security Agreement
General References
Standards and Certifications
Glossary
Contact Us

Public Network Connection Failure

PDF
Focus Mode
Font Size
Last updated: 2025-06-12 16:15:43

Problem Description

Failed to connect to a TDSQL-C for MySQL instance via a public network address from Cloud Virtual Machine (CVM) or a third-party application.
Note:
There are various ways to connect to TDSQL-C for MySQL, such as login through the Database Management Center (DMC) console, private network connections, public network connections, and Cloud Connect Network (CCN) connections. Different connection methods require different conditions. For example, if you need to connect to TDSQL-C for MySQL via a public network address, but you enter a private network address in the command line, the connection will fail. Similarly, if you have purchased Lighthouse but have not connected to a network through CCN, the connection will also fail when you directly use a command to connect to TDSQL-C for MySQL. Therefore, when the connection fails, it is recommended to first refer to the connection methods and application scenarios in Connecting to Cluster > Overview to check whether the conditions are met.

Possible Causes

Possible Cause
Description
The password is incorrect.
The CVM security group configuration is incorrect.
The TDSQL-C for MySQL security group configuration is incorrect.
The database account restricts access of specific host addresses.
The connection command is incorrect.
The IP address and port in the command line or configuration file are incorrect.
The TDSQL-C for MySQL instance's storage space is full, the maximum number of connections has been reached, there is an issue with the timeout parameter settings, the instance is in the "availability zone switching" state, and other issues.
Unknown MySQL server host (110 or 11004) error occurs during instance connection.
TDSQL-C for MySQL instance running status
The TDSQL-C for MySQL instance is isolated. You can use the recycle bin to restore it.
CVM instance status
The CVM instance is isolated or shut down. You can restore or start it in the console.

Solutions

Password Issue: The Password Is Incorrect

The password used for connection is incorrect. You can reset the password or create a temporary account with the required permissions to log in to the database.

Security Group Configuration Issue 1: The CVM Security Group Configuration Is Incorrect

To connect CVM to TDSQL-C for MySQL, you need to configure outbound rules in the CVM security group. When the target configuration of the outbound rules is not 0.0.0.0/0 and the protocol port is not ALL, you should add the private IP address and port of TDSQL-C for MySQL to the outbound rules.
1. Log in to the Security Group console and click the security group name to enter the details page of the security group associated with CVM.
2. Select the Outbound Rules tab and click Add Rule. Select MySQL (3306) for Type; enter the private IP address (range) of your TDSQL-C for MySQL for Target; select Allow for Policy.

Security Group Configuration Issue 2: The TDSQL-C for MySQL Security Group Configuration Is Incorrect

To connect the specified CVM to TDSQL-C for MySQL, you need to configure inbound rules in the TDSQL-C for MySQL security group. When the source configuration of the inbound rule is not 0.0.0.0/0 and the protocol port is not set to ALL, you need to add the private IP address and port of TDSQL-C for MySQL to the inbound rules.
1. Log in to the Security Group console and click the security group name to enter the details page of the security group associated with TDSQL-C for MySQL.
2. Select the Inbound Rules tab and click Add Rule.
3. Fill in the IP address (range) you allow to connect and the port to be opened (private network port of TDSQL-C for MySQL) and choose to allow access.
4. Select MySQL (3306) for the type; for source, enter the private IP address (or range) of your TDSQL-C for MySQL; for policy, select Allow.

Issue with the Host Addresses Authorized to an Account: The Database Account Restricts Access of Specific Host Addresses

In addition to security group and subnet restrictions, a database account is also restricted by the TDSQL-C for MySQL account system. If the database account specifies a particular host address, other addresses cannot connect to TDSQL-C for MySQL. You can modify the host address authorized to the database account via the TDSQL-C for MySQL console to restrict database access and enhance connection security.
1. Log in to the TDSQL-C for MySQL console and click the cluster ID in the cluster list to enter the cluster management page.
2. Select the Account Management tab, find the account for which you need to modify the host address, and choose More > Modify Host in the Operation column.
3. In the pop-up window, enter a new host address and click OK to modify the host address authorized to the account.
Note:
The host address can be an IP address or contains % (indicating no limit on the IP range). Multiple host addresses should be separated by delimiters, and the delimiters can be line breaks, spaces, and ; , |.
Example 1: Entering % indicates no limit on the IP range, allowing clients from any IP address to use this account to connect to a database.
Example 2: Entering 10.5.10.% indicates that clients with IP addresses in the range of 10.5.10.% can use this account to connect to a database.

Connection Syntax Issue: The Connection Command Is Incorrect

Check whether the connection command is incorrect. Refer to the standard public network connection command:
mysql -h <Public IP address> -u <Username, default root> -P <Public network port number> -p
<Public IP address>: Replace it with the public IP address of the target TDSQL-C for MySQL database instance, which can be found on the cluster details page in the TDSQL-C for MySQL console.
<Username, default root>: Replace it with the account name of the target TDSQL-C for MySQL database instance. The default account name is root.
<Public network port number>: Replace it with the public network port number of the target TDSQL-C for MySQL database instance, which can be found on the cluster details page in the TDSQL-C for MySQL console.

Issue with IP Addresses and Ports: The IP Address and Port in the Command Line or Configuration File Are Incorrect

When connecting to a database via commands, check whether the instance's public IP address and port number are correct, which can be found on the cluster details page in the TDSQL-C for MySQL console.

TDSQL-C for MySQL Instance Issue: The TDSQL-C for MySQL Instance's Storage Space Is Full, the Maximum Number of Connections Has Been Reached, There Is an Issue with the Timeout Parameter Settings, and Other Issues

If the storage space of a TDSQL-C for MySQL instance is full, it may affect the connection to a database. It is recommended to expand the storage space. For the procedure, refer to Adjusting Storage Space.
When the message "ERROR 1040(00000): Too many connections" appears, it means the current number of connections of a cloud database instance has exceeded the limit. Common causes and solutions are as follows: i. There are many sleep threads. It is recommended to reduce the values of the wait_timeout and interactive_timeout parameters in the console. For the procedure, refer to Setting Instance Parameters. ii. There are few sleep threads and no slow query accumulation. It is recommended to increase the value of the max_connections parameter in the console. For the procedure, refer to Setting Instance Parameters.
Check whether the instance is in the "availability zone switching" state. If the TDSQL-C for MySQL instance is in the "availability zone switching" state, the connection will fail. Wait for the switching to complete before reconnecting via commands.

Unknown MySQL Server Host (110 or 11004) Error Occurs During Instance Connection


The public network address may be input incorrectly. Check whether the instance's public network address is enabled and whether the input is correct. If the public network address input on the client is confirmed to be correct, you can ping the public network address to check whether the resolution is normal.
If it is normal, the specific network latency will be returned, and the troubleshooting ends.
If it is abnormal, an unknown host error will be returned. Submit a ticket for processing.

Help and Support

Was this page helpful?

Help us improve! Rate your documentation experience in 5 mins.

Feedback