MySQL Slow Query Logging

by damonp on December 5, 2006

in Snippets,SQL,SysAdmin

Add to /etc/my.cnf under [mysqld] stanza

MySQL5

log_slow_queries  = /var/log/mysqld-slow.log
long_query_time   = 1

MySQL3, MySQL4

log-slow-queries=/var/log/mysqld-slow.log
set-variable    = long_query_time=1

Popularity: 1%

Most Popular Posts

Damon Parker is a freelance sysadmin and web developer in Texas. He specializes in server setup, server security and high performance server configurations. Need help setting up a web server or getting a server back online after a crash or hack? Email Damon

Leave a Comment

Previous post:

Next post: