All Products
Search
Document Center

ApsaraDB RDS:Connect to a MariaDB instance

Last Updated:Mar 30, 2026

After creating an ApsaraDB RDS for MariaDB instance and completing the required setup — whitelist configuration and account creation — connect to it using Data Management (DMS) or a database client.

Prerequisites

Before you begin, ensure that you have:

Connect using DMS

Data Management (DMS) is a GUI-based tool developed by Alibaba Cloud. It supports relational databases and NoSQL databases, and provides data management, schema management, user authorization, security audit, data trend analysis, data tracking, business intelligence (BI) reporting, and performance optimization.

  1. Go to the Instances page. In the top navigation bar, select the region where your RDS instance resides, then click the instance ID.

  2. In the upper-right corner, click Log On to Database.

  3. In the dialog box, enter the username and password for your RDS account, then click Login.

    To find your account credentials, go to the instance page and click Accounts in the left-side navigation pane. If you forgot your password, click Reset Password.
  4. After logging in, double-click the database name in the left-side navigation pane to switch to that database.

Connect using a database client

ApsaraDB RDS is fully compatible with open source MariaDB, so any MariaDB-compatible client works. The following steps use HeidiSQL as an example.

Find your connection details

Before configuring the client, locate the following values in the RDS console. For instructions, see View and change the internal and public endpoints and port numbers.

Detail HeidiSQL field Example value
Internal or public endpoint Hostname / IP rm-bp1xxxxxxxxxxxxxx.mysql.rds.aliyuncs.com
Port number Port See console
Account username User Your RDS account username

Which endpoint to use:

  • Internal endpoint — use this when your client runs on an Elastic Compute Service (ECS) instance in the same region and Virtual Private Cloud (VPC) as the RDS instance.

  • Public endpoint — use this in all other cases.

Configure HeidiSQL and connect

  1. Start the HeidiSQL client.

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

  3. Enter the connection parameters.

    Parameter Value Description
    Network type Select MariaDB or MySQL (TCP/IP) Network protocol for the connection
    Library Retain the default value Dynamic-link library for the client
    Hostname / IP Internal or public endpoint Example: rm-bp1xxxxxxxxxxxxxx.mysql.rds.aliyuncs.com
    User RDS account username
    Password RDS account password
    Port Internal or public port number If you connect over an internal network, enter the internal port number. If you connect over the Internet, enter the public port number. See View and change the internal and public endpoints and port numbers.

    HeidiSQL connection parameters

  4. Click Open.

If the connection succeeds, the HeidiSQL interface loads the database.

Successful connection

Troubleshooting

Error Cause Fix
Unknown MySQL server host 'xxxxxxxxx' (11001) Hostname / IP is set to the instance ID or an 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) Alibaba Cloud account credentials were used instead of an RDS account. Use the username and password of an account created on the Accounts page of the RDS instance.
Can't connect to MySQL server on 'rm-bp1xxxxxxxxxxxxxx.mysql.rds.aliyuncs.com' (10060) (slow response) The public IP address of the machine running HeidiSQL is not in the IP address whitelist. Add the public IP address to the whitelist. See Configure an IP address whitelist.
To confirm that a whitelist issue is the cause of error 10060, temporarily add 0.0.0.0/0 to the whitelist and retry the connection. If the connection succeeds, the whitelist is misconfigured. Remove 0.0.0.0/0 and add only the actual public IP address. For help finding it, 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 use Function Compute to read data from my RDS instance?

Install third-party dependencies in your Function Compute function and use built-in modules to query the RDS instance. For details, see Install third-party dependencies for a function.