mysql slow log
/etc/my.cnf
[mysqld]
slow_query_log = ON
slow_query_log_file = /usr/local/mysql/data/slow.log
long_query_time = 2
SHOW VARIABLES LIKE '%query%';
Variable_name |Value |
----------------------------|------------------------------|
binlog_rows_query_log_events|OFF |
ft_query_expansion_limit |20 |
have_query_cache |NO |
long_query_time |2.000000 |
query_alloc_block_size |8192 |
query_prealloc_size |8192 |
slow_query_log |ON |
slow_query_log_file |/usr/local/mysql/data/slow.log|