You can view the error logs and slow query logs for an instance on the Logs page in the ApsaraDB for RDS console to troubleshoot issues.
This topic covers error logs and slow query logs. For information about the binary log, see Back up an ApsaraDB RDS for MariaDB instance and Download a log backup.
Usage notes
Slow query log integrity: Slow query log records can be incomplete or lost in the following scenarios:
The instance is under high load and experiences performance bottlenecks.
The instance receives a large number of SQL requests in a short period.
The service component that collects slow query logs is not working correctly.
Procedure
Log on to the ApsaraDB for RDS console.
In the upper-left corner, select the region where the instance is located.
Find the target instance and click its instance ID.
In the navigation pane on the left, click Logs.
On the Logs page, click the Error Log, Slow Query Log, or Slow Query Log Summary tab. Then, select a time range and click Search.
Tab
Description
Error Log
Records database errors from the past month.
Slow Query Log
Records SQL statements from the past month that took longer than one second to execute. Similar SQL statements are deduplicated. You can modify this threshold by changing the long_query_time parameter. For more information, see Reconfigure parameters for an RDS MariaDB instance.
Slow Query Log Summary
Provides a statistical analysis of SQL statements from the past month that took longer than one second to execute. You can modify this threshold by changing the long_query_time parameter. For more information, see Reconfigure parameters for an RDS MariaDB instance.