MySQL Slow Query Log File
February 17, 2005
MySQL has a feature that allows you to log slow running queries to a file. To enable you just need to add some lines to your my.cnf file, and restart. Add the following:
log-slow-queries = /var/log/mysql/mysql-slow.log long_query_time = 1
The above will log queries taking longer than one second to the specified log file.
You can read more in the MySQL Reference Manual
Tweet
Trackbacks
Trackback Address: 233/AEB5F2A8AEF38EEEC2701EFE0F9EEFA6
Comments
On 10/02/2006 at 2:05:16 PM EDT Rolando wrote:
1
Regards..
I need catch all id and message avents (1064 You have a error in your SQL syntaxis) from MySQL database, because in the log, log-error the messages is not very good description..
Thanks, Rolando
On 03/15/2010 at 9:21:56 AM EDT Andrew wrote:
2
Thank you for this. I was looking for a way to debug mysql as I've been having some problems.
Andrew http://www.tv-links.eu
On 03/29/2010 at 4:03:32 AM EDT Daniel W wrote:
3
You'd think they'd mention this on this page in the manual, but I don't see it:
http://dev.mysql.com/doc/refman/5.1/en/slow-query-log.html
Thanks!
Post a Comment
Recent Entries
- Nginx redirect www to non www domain
- HashDOS and ColdFusion
- HackMyCF Updated for APSB11-29 Security Hotfix
- Adobe eSeminar on FuseGuard
- Determining Which Cumulative Hotfixes are Installed on ColdFusion
- Adding Two Factor Authentication to ColdFusion Administrator
- ColdFusion Developer Week at Adobe.com
- Bug Loading Scripts for CFFileUpload and CFMediaPlayer


add to del.icio.us


