All Products
Search
Document Center

ApsaraDB RDS:Connect to an ApsaraDB RDS for MariaDB instance

Last Updated:Mar 28, 2026

Connect to your ApsaraDB RDS for MariaDB instance from an Elastic Compute Service (ECS) instance or your local computer using Data Management (DMS) or a database client.

Prerequisites

Before you begin, ensure that you have:

Connect using DMS

Data Management (DMS) is a graphical data management service for managing relational databases and NoSQL databases. It provides data management, schema management, user authorization, security audit, trend analysis, data tracking, business intelligence (BI) charts, and performance analysis and optimization.

  1. Log on to the ApsaraDB RDS console and navigate to your instance.

  2. Click Databases.

  3. Find the database you want to manage and click SQL Query in the Actions column.

  4. On the DMS logon page, enter the connection credentials for the RDS instance.

Connect using a database client

ApsaraDB RDS for MariaDB is fully compatible with open-source MariaDB, so you can connect with any standard MariaDB client. The following example shows how to connect using HeidiSQL.

Connect using HeidiSQL

HeidiSQL is a free GUI client for MariaDB and MySQL.

  1. Start HeidiSQL.

  2. In the lower-left corner of the Session manager dialog box, click New.

  3. Configure the following parameters:

    Connection settings

    ParameterValue
    Network typeSelect MariaDB or MySQL (TCP/IP)
    LibraryKeep the default value
    Hostname / IPInternal or public endpoint of the RDS instance. Example: rm-bp1xxxxxxxxxxxxxx.mysql.rds.aliyuncs.com. See View and change the internal and public endpoints and port numbers
    UserUsername of the account created on the RDS instance. See Create a database and an account
    PasswordPassword of the account
    PortInternal port (for internal network connections) or public port (for Internet connections)
    • Use the internal endpoint when HeidiSQL runs on an ECS instance in the same region and virtual private cloud (VPC) as the RDS instance.

    • Use the public endpoint in all other scenarios.

  4. Click Open.

    If the preceding parameters are properly configured, the RDS instance can be connected.

    Connection established

Troubleshooting

Unknown MySQL server host 'xxxxxxxxx' (11001)

The Hostname / IP value is incorrect. This error occurs when you enter the instance ID or IP address instead of the endpoint. Set Hostname / IP to the internal or public endpoint of the RDS instance.

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

The credentials are incorrect. Make sure you are using the username and password of an account created on the RDS instance—not your Alibaba Cloud account credentials. Create a database account on the Accounts page of the RDS instance.

Can't connect to MySQL server on 'rm-bp1xxxxxxxxxxxxxx.mysql.rds.aliyuncs.com' (10060)

The IP address whitelist is blocking the connection. Add the public IP address of your client to an IP address whitelist of the RDS instance. See Configure an IP address whitelist for an ApsaraDB RDS for MariaDB instance.

Note

To confirm the whitelist is the cause, temporarily add 0.0.0.0/0 to the whitelist. If the connection succeeds, the problem is the whitelist configuration. Remove 0.0.0.0/0 and add only the actual public IP address of your client. For help finding your public IP address, see Why am I unable to connect to my ApsaraDB RDS for MySQL instance or ApsaraDB RDS for MariaDB instance from a local server over the Internet?

FAQ

How do I access RDS data from Function Compute?

Install a third-party MariaDB or MySQL driver as a dependency in your Function Compute function. Once installed, use the driver's built-in connection methods with your RDS endpoint, port, username, and password. For instructions on adding dependencies, see Install third-party dependencies for a function.