All Products
Search
Document Center

ApsaraDB RDS:Troubleshoot instance connection issues

Last Updated:Oct 12, 2026

This topic explains how to resolve connection failures to ApsaraDB RDS instances.

Common connection errors

Find the error message that matches your situation and follow the corresponding solution.

SQL Server

Error message

Cause

Solution

Cannot connect to XXX. A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: TCP Provider, error: 0 - A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.) (Microsoft SQL Server, Error: 10060 or 258)

Network connectivity issue.

  • The ECS instance and the RDS instance must be in the same region.

  • They must use the same network type.

  • If they are in a VPC, they must be in the same one.

  • Add the private IP address of the ECS instance to the IP address whitelist of the RDS instance.

  • Verify that the private endpoint and port of the RDS instance are configured correctly on the ECS instance.

For more information, see Solutions.

Cannot connect to XXX.

A connection was successfully established with the server, but then an error occurred during the login process. (provider: TCP Provider, error: 0 - The specified network name is no longer available.) (Microsoft SQL Server, Error: 64)

IP address whitelist configuration issue.

Check the instance IP address whitelist

Logon failed for login 'user' due to trigger execution

The connection limit is reached.

Check the number of connections to the instance and whether there are blocked connections

cannot open user default database.Login failed

The connecting user's default database lacks an associated user on the ApsaraDB RDS for SQL Server instance.

Create an associated user for the logon user in the database

From XXX (172.17.XX.XX) icmp_seq=1 Destination Host Unreachable

The ECS instance cannot ping the private endpoint of the RDS instance because the private CIDR block of the RDS instance conflicts with that of another service on the ECS instance.

"Destination Host Unreachable" is returned when you ping the private endpoint of an RDS instance to which you cannot connect

DMS connection errors

For related operations, see Connect to an RDS SQL Server database by using DMS.

Important

If you reset an account password, you must log on to DMS again.

Error message

Cause

Solution

The MYSQL server is running with the --rds-deny-access option so it cannot execute this statement

  • The RDS instance has expired.

  • The disk of the RDS instance is full.

Log on to the ApsaraDB RDS console to check whether the instance is locked:

Sorry, you cannot access this instance by using DMS at the moment.

You are not the instance owner and have not been granted logon permissions.

Authorize an Alibaba Cloud account

Unable to log on to the database due to an IP address whitelist issue.

The DMS service CIDR block is missing from the RDS IP address whitelist.

Add the DMS service CIDR block to the IP address whitelist

ECS cannot access RDS over internal network

  • To connect to an RDS instance using its private endpoint, you must add the private IP address of the ECS instance to the RDS instance's IP address whitelist.

    Note
  • The ECS instance and the RDS instance must be in the same region to communicate over the internal network. They can be in the same or different availability zones within the same region.

    • Make sure that the ECS instance and the RDS instance are in the same region:

      1. View the region of the ECS instance.

      2. View the region of the RDS instance.

    • If the ECS instance and the RDS instance are in different regions, they cannot communicate directly over the internal network. Use one of the following methods:

      • Method 1:

        • Release the ECS instance, and then purchase a new instance in the same region as the RDS instance.

        • Release the RDS instance, and then purchase a new instance in the same region as the ECS instance.

      • Method 2: An ECS instance connects to an RDS instance by using the public endpoint of the RDS instance. This method provides poor performance, security, and stability. For more information about how to apply for a public endpoint, see Apply for a public endpoint for SQL Server.

Check the network type

  1. Ensure that the ECS instance and the RDS instance have the same network type (both are in a VPC or both are in the classic network).

    • View the network type of the ECS instance.

    • View the network type of the RDS instance.

  2. If one instance is in the classic network and the other is in a VPC, use one of the following methods:

    • Scenario: The ECS instance is in a VPC, and the RDS instance is in the classic network.

      • Method 1 (recommended): Migrate the RDS instance from the classic network to the VPC of the ECS instance. For more information, see Change the network type.

      • Method 2: Purchase a new ECS instance that is in the classic network. However, a VPC is recommended because it provides better security.

        Note

        You cannot migrate an ECS instance from a VPC to the classic network.

      • Method 3: An ECS instance connects to an RDS instance by using the public endpoint of the RDS instance. This method offers poor performance, security, and stability. To learn how to request a public endpoint, see Request a public endpoint for SQL Server.

    • Scenario: The ECS instance is in the classic network, and the RDS instance is in a VPC.

  3. If both the ECS instance and the RDS instance are in a VPC, confirm that they are in the same VPC.

    • View the VPC ID of the ECS instance.

    • View the network type of the RDS instance.

  4. If they are in different VPCs, use one of the following methods:

    • Method 1 (recommended): Migrate the RDS instance to the VPC where the ECS instance resides. For more information, see Change the VPC and vSwitch of an ApsaraDB RDS instance.

    • Method 2: Use CEN to connect the two VPCs.

    • Method 3: An ECS instance connects to an RDS instance by using the public endpoint of the RDS instance. This method provides poor performance, security, and stability. For information about how to apply for a public endpoint, see Apply for a SQL Server public endpoint.

  5. If the ECS and RDS instances are in the same VPC and region, but you can only connect using the public endpoint (not the private one), and both ping and telnet fail, see An ECS instance cannot connect to an RDS instance due to a routing issue.

Cannot access RDS over the internet

  • Confirm the public endpoint

    Verify that you are using the public endpoint of the RDS instance. This endpoint is available on the Database Connection page in the ApsaraDB RDS console.

  • Confirm that the public IP address of the local device is added to the IP address whitelist

    Important

    The public IP address of a local device may change. For example, if the public IP address is dynamic, a change in the IP address may cause a connection failure. For a stable connection, use a private connection or configure a sufficiently broad public CIDR block in the IP address whitelist.

    Ensure that the correct public IP address of your local device has been added to the RDS IP address whitelist. To troubleshoot, temporarily add 0.0.0.0/0 to the IP address whitelist of the database. If you can access the database normally after this change, it means the IP address whitelist is not configured correctly.

    You can use the following methods to obtain the public IP address of your local device and add this address to an IP address whitelist. For more information, see Configure an IP address whitelist for ApsaraDB RDS for SQL Server.

    For more information, see the following topics:

Cross-account access

If your ECS instance and RDS instance are in different Alibaba Cloud accounts, use one of the following methods to connect:

References

Troubleshoot ApsaraDB RDS connection failures

Applicable to

ApsaraDB RDS