MySQL: how to enable Slow Query Log?

Posted by Continuation on Server Fault See other posts from Server Fault or by Continuation
Published on 2011-02-28T11:54:51Z Indexed on 2011/03/04 7:26 UTC
Read the original article Hit count: 480

Filed under:
|

Can you give me an example on how to enable MySQL's slow query log?

According to the doc:

As of MySQL 5.1.29, use --slow_query_log[={0|1}] to enable or disable the slow query log, and optionally --slow_query_log_file=file_name to specify a log file name. The --log-slow-queries option is deprecated.

So how do I use that option? Can I put it in my.cnf? An example would be greatly appreciated.

Thank you very much

© Server Fault or respective owner

Related posts about mysql

Related posts about DBA