How do I enable log_slow_queries on MySQL 5.1? Im running redhat.
Tell me more
×
Server Fault is a question and answer site for
professional system and network administrators. It's 100% free, no registration required.
|
As mentioned by RedMumba, this is correct..
http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html#sysvar_log_slow_queries you might also want to consider how "slow" the queries are by seconds that you want to log using
http://dev.mysql.com/doc/refman/5.1/en/server-system-variables.html#sysvar_long_query_time |
|||
|
|
|
You'll want to edit /etc/my.cnf and add:
Where the value is equal to the log file to store the slow queries. Andrew |
|||
|
|
|
You may also want to define what a slow query time is, eg: long_query_time = 5 Both this and log_slow_queries should be in the [mysqld] section. |
|||
|
|