After you complete the initial configuration, you can connect to an RDS for MariaDB instance from an ECS instance or a database client.
The following operations are completed:
Use a client to connect to an RDS instance
ApsaraDB RDS for MySQL is fully compatible with open source MySQL. You can connect to an ApsaraDB RDS for MySQL instance from a database client by using a similar method that you use to connect to an open source MySQL database. In the following example, the HeidiSQL client is used.
- Start the HeidiSQL client.
- In the lower-left corner of the Session manager dialog box, click New.
- Enter information about the RDS instance that you want to connect. The following table
describes the required parameters.
Parameter Description Network type Select the network type of the RDS instance that you want to connect. For this example, select MariaDB or MySQL (TCP/IP). Hostname / IP Enter the internal or public endpoint of the RDS instance.
- If your client is deployed on an ECS instance that is in the same region and has the same network type as the RDS instance, use the internal endpoint. For example, if your ECS and RDS instances are both in a VPC located in the China (Hangzhou) region, you can use the internal endpoint of the RDS instance to create a secure connection.
- In other scenarios, use the public endpoint.
For more information about how to view the internal and public endpoints and the port numbers of the RDS instance, see A new version is available..
User Enter the username of the account that you use to connect to the RDS instance. Password Enter the password of the account. Port Enter the port number of the RDS instance. If you connect to the instance over an internal network, enter the internal port number of the instance. If you connect to the instance over the Internet, enter the public port number of the instance.
- Click Open.
If the connection information is correct, the RDS instance is connected.
Q: How do I obtain data of an RDS for MariaDB instance from Function Compute?
A: You can install third-party dependencies for your functions in Function Compute and use built-in components to obtain the data. For more information, see Install third-party dependencies for functions.