0

How do I enable the MySQL slow query log?

How do I enable the MySQL slow query log?

keeljohnston
asked Jan 6, 2019
1 Answer
0

1.Enter the MySQL shell and run the following command:

set global slow_query_log = 'ON';

2 Enable any other desired options. Here are some common examples:

Log details for queries expected to retrieve all rows instead of using an index:

set global log_queries_not_using_indexes = 'ON'

Set the path to the slow query log:

set global slow_query_log_file ='/var/log/mysql/slow-query.log';

View More
linuxhelp
answered Jan 12, 2019
Your Answer
||||
 
100:0