Help Center/ Relational Database Service_RDS for MariaDB/ FAQs/ Database Connection/ What Should I Do If an ECS Cannot Connect to an RDS for MariaDB Instance over a Private Network?
Updated on 2025-06-24 GMT+08:00

What Should I Do If an ECS Cannot Connect to an RDS for MariaDB Instance over a Private Network?

Perform the following steps to identify the problem:

  1. Check whether the ECS and RDS for MariaDB instance are located in the same VPC.

    • If they are in the same VPC, go to 2.
    • If they are in different VPCs, create an ECS in the VPC in which the RDS for MariaDB instance is located.

  2. Check whether the security group rules of the RDS instance are appropriate.

    For details, see Configuring a Security Group Rule.

  3. On the ECS, check whether the RDS for MariaDB instance port can be connected.

    The default port of RDS for MariaDB is 3306.

    curl -kv Floating_IP_address:Port
    • If the ECS can connect to the DB instance port, no further action is required.
    • If the ECS still cannot connect to the port, contact technical support.