This topic describes how to view the slow query logs of an ApsaraDB RDS for MySQL instance.

View slow query logs in the ApsaraDB for RDS console

  1. Log on to the ApsaraDB for RDS console.
  2. In the top navigation bar, select the region where the target RDS instance resides.
  3. Find the target RDS instance and click its ID. The Basic Information page appears.
  4. In the left-side navigation pane, click Logs.
  5. Click the Slow Query Logs tab and view details about the slow query logs of the RDS instance.

View slow query logs by using commands

Note If your RDS instance is running MySQL 5.5, you cannot view slow query logs by using commands.
  1. Log on to the target RDS instance.
  2. In the top navigation bar, choose SQL Operations > SQL Window.
  3. Run the following command to obtain the slow query logs of the RDS instance:
    select * from mysql.slow_log