How to enable MYSQL slow query log:
1. Edit /etc/my.cnf
2. Add the following:
#Slow Query Log #Log file log-slow-queries = /var/log/slow-queries-log #Logs queries longer than 2 sec long_query_time = 2 #Logs queries not using indexes log-queries-not-using-indexes TRUE
3. Change owner on log file /var/log/slow-queries-log to
4. Restart MYSQL
How useful was this post?
Click on a star to rate it!
Average rating / 5. Vote count:
No votes so far! Be the first to rate this post.