Amazon RDS mysql enable slow querry log
There is one parameter that need to be updated to enable the slow query log, and two that define how it works:
slow_query_log
: Needs to be set to 1 to enable it.
long_query_time
: Tells what long-running queries get logged.
min_examined_row_limit
: If you care less about run-time and more about queries that might be table-scanning, setting this to a non-zero value will limit what gets logged to queries that touch too many rows.
You need to change log_output parameter to file as it's default value is TABLE. At the moment your slow query are going to table slow_log. You can verify it.
Select * from mysql.slow_log.
Change the parameter log_output to FILE and log will be written to file.