2

I have created aws aurora mysql with serverless option. For parameter group I have set

slow_query_log = 1
slow_query_log_file = /rdsdbdata/log/slowquery/mysql-slowquery.log
log_output = TABLE

When I connect to the instance and run show global variables like '%log_out%'; it show the setting for log_out = FILE Also I do not see any option like in instance type where I can set the log to show up in cloudwatch.

So How can I look at the slow query log for AWS Aurora Serverless

kumar
  • 8,207
  • 20
  • 85
  • 176
  • To assist with - How can I look at the slow query log for AWS Aurora Serverless - look at this URL please. https://aws.amazon.com/premiumsupport/knowledge-center/rds-aurora-mysql-logs-cloudwatch/ – Wilson Hauck May 15 '20 at 11:46
  • there is no "Log exports" section in aurora serveless – kumar May 15 '20 at 11:50

1 Answers1

0

In your AWS parameter group, make log_output = FILE rather than TABLE. This is a dynamic parameter and should cause your slow_query_log_file to include information for queries that take longer than 'long_query_time' seconds to complete execution. Use SELECT @@long_query_time to determine current setting. long_query_time of 1 would probably be more useful than 10 (seconds).

Wilson Hauck
  • 2,094
  • 1
  • 11
  • 19
  • I do not understand does aurora serverless not support TABLE? also if I change it to file How to I access the log file in aurora serverless. – kumar May 15 '20 at 11:48
  • 1
    As I understand the info in the URL above, your viewing opportunity is through Cloudwatch only. After you cause them to be 'Published'. – Wilson Hauck May 15 '20 at 11:58