Is it possible to use the MySQL Server Log to log slow queries? I tried altering the my.cnf file (adding --log-slow-queries) but that did not seem to work.
Thanks.
Results 1 to 10 of 12
Thread: MySQL slow query log
Hybrid View
-
05-15-2007, 10:08 AM #1Junior Member
- Join Date
- May 2007
- Posts
- 7
MySQL slow query log
-
05-15-2007, 02:49 PM #2Senior Member
- Join Date
- May 2005
- Posts
- 130
you would put "log_slow_queries" in the /etc/my.cnf file.
and don't forget to restart your vps or restart mysqld ("/etc/rc.d/init.d/mysqld restart").
-
05-15-2007, 03:45 PM #3Junior Member
- Join Date
- May 2007
- Posts
- 7
Thank you! I didn't know about the restarting! Am going to try first thing tomorrow...
-
05-18-2007, 01:25 PM #4Junior Member
- Join Date
- May 2007
- Posts
- 7
Anyone know exactly where the slow query log would appear? I was assuming in the /var/lib/mysql directory, but after a day, nothing.
Wasn't sure if the query time (I set it to "1") was long enough that my queries weren't getting caught, but I tried setting it to 0 for a few hours and still am not seeing anything.
I've reset it it 1 for fear of creating a huge file (perhaps unfounded as my sites are LOW traffic) over the weekend.
Insight very much appreciated... feeling very foolish!
-
05-18-2007, 04:20 PM #5
Other logs are written to /var/log. Have you checked there?
Shawn
Please remember your charity of choice: http://www.redcross.org
Handy Links: wildjokerdesign.net | Plain Text Editors: EditPlus | Crimson
-
05-21-2007, 09:47 AM #6Junior Member
- Join Date
- May 2007
- Posts
- 7
I have and I'm not seeing it.
Any other ideas appreciated. I'm going to try putting the query time down to 0 and waiting 24 hours.
Similar Threads
-
Unable to uninstall MySQL 3.23 nor upgrade to MySQL 5
By lifelinesfoundation in forum PHP / MySQLReplies: 1Last Post: 07-02-2007, 07:18 AM -
MySQL query browser?
By distortedimage in forum PHP / MySQLReplies: 1Last Post: 11-08-2006, 05:14 PM -
connecting to mysql using mysqlcc
By pinhead in forum PHP / MySQLReplies: 4Last Post: 03-11-2005, 09:23 PM -
Cache size in MySQL 4.1.x
By Corrado Fiore in forum PHP / MySQLReplies: 0Last Post: 02-02-2005, 04:00 AM -
Mysql 4.0.20 + php 5.0.2 installed on a VPS and working
By ssever in forum PHP / MySQLReplies: 0Last Post: 12-18-2004, 09:34 AM
Reply With Quote