All Products
Search
Document Center

ApsaraDB RDS:Connect to an ApsaraDB RDS for MariaDB instance

Last Updated:Jun 20, 2026

After completing the initial configuration, you can connect to your ApsaraDB RDS for MariaDB instance from an ECS instance or your local client.

Before you begin

Complete the following tasks:

Method 1: Connect by using DMS

Data Management (DMS) is a graphical tool from Alibaba Cloud for managing relational and NoSQL databases. DMS provides a wide range of features, including data management, schema management, user authorization, security auditing, data trending, data tracking, BI charts, and performance optimization.

On the Databases page, click SQL Query on the right to log in to the database.

Method 2: Connect by using a client

ApsaraDB RDS is fully compatible with native database services, so you can connect to an ApsaraDB RDS instance using any standard database client. This topic uses HeidiSQL as an example.

  1. Launch the HeidiSQL client.

  2. In the lower-left corner, click New.

  3. Enter the connection information for the ApsaraDB RDS instance. The following table describes the parameters.

    Parameter

    Description

    Network Type

    Select MariaDB or MySQL (TCP/IP).

    Library

    Keep the default value.

    Hostname/IP

    Enter the internal or public endpoint of the ApsaraDB RDS instance. Example: rm-bp1xxxxxxxxxxxxxx.mysql.rds.aliyuncs.com. For more information about how to view endpoints, see View and change internal and public endpoints and ports.

    • If your client is running on an ECS instance in the same region and network type as the ApsaraDB RDS instance, use the internal endpoint. For example, if both instances are in the same Virtual Private Cloud (VPC) in the China (Hangzhou) region, using the internal endpoint provides a secure and high-performance connection.

    • In other cases, use the public endpoint.

    User

    Enter the username of the account on the ApsaraDB RDS instance. For more information about how to create an account, see Create a database and an account.

    Password

    Enter the password for the account.

    Port

    Enter the internal port if connecting via the internal network, or the public port if connecting via the internet. For more information, see View and change internal and public endpoints and ports.

  4. Click Open.

    If the connection information is correct, the connection succeeds.

The following are common connection errors:

  • Unknown MySQL server host 'xxxxxxxxx'(11001)

    Ensure the Hostname/IP is correct. You must enter the instance's internal or public endpoint, not the instance ID or an IP address.

  • Access denied for user 'xxxxx'@'xxxxx'(using password:YES)

    Ensure the username and password are correct. Use the database account credentials from the instance's Accounts page, not your Alibaba Cloud account credentials.

  • A slow response followed by a Can't connect to MySQL server on 'rm-bp1xxxxxxxxxxxxxx.mysql.rds.aliyuncs.com'(10060) error is returned.

    Check whether the whitelist is configured correctly. You must add the public IP address of the client to the whitelist. For more information, see Configure a whitelist.

    Note

    To troubleshoot, you can temporarily set the whitelist to 0.0.0.0/0. If the connection then succeeds, the whitelist was the issue. Replace 0.0.0.0/0 with the client's correct IP address. For more information, see What to do if I fail to connect to an ApsaraDB RDS for MySQL or MariaDB instance over the internet?.

FAQ

Q: How do I use Function Compute to retrieve data from an ApsaraDB RDS instance?

A: Install a third-party dependency for the function and then use a built-in module to retrieve data from the ApsaraDB RDS instance. For more information, see Install third-party dependencies for a function.