How can I enable MySQL's slow query log without restarting MySQL?

Posted by mmattax on Stack Overflow See other posts from Stack Overflow or by mmattax
Published on 2010-03-08T18:44:10Z Indexed on 2010/03/08 19:06 UTC
Read the original article Hit count: 272

Filed under:

I followed the instructions here: http://crazytoon.com/2007/07/23/mysql-changing-runtime-variables-with-out-restarting-mysql-server/ but that seems to only set the threshold.

Do I need to do anything else like set the filepath?

According to MySQL's docs

If no file_name value is given for --log-slow-queries, the default name is 
host_name-slow.log. The server creates the file in the data directory unless 
an absolute path name is given to specify a different directory. 

Running

SHOW VARIABLES

doesn't indicate any log file path and I don't see any slow query log file on my server...

© Stack Overflow or respective owner

Related posts about mysql