log-slow-queries

log-slow-queries

am 07.05.2010 19:04:36 von Stephen Sunderlin

Can't get slow querys to log. Does this not work in myisam?

*snip*
[mysqld]
log-slow-queries = /var/log/mysql/mysql-slow.log
long_query_time = 1
*snip*

restarted mysqld - no log.

Created in file in /var/log/mysql/

*snip*
-rwxr--r-- 1 mysql mysql 0 May 7 10:33 mysql-slow.log
*snip*

still not writing to the file

I've read
http://dev.mysql.com/doc/refman/5.0/en/slow-query-log.html
http://www.mydigitallife.info/2007/01/22/enable-logging-of-s low-queries-slow-query-log-in-mysql-database/


looks pretty simple - not sure what I'm missing.

Thanks!



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

Re: log-slow-queries

am 07.05.2010 22:58:40 von mos

At 12:04 PM 5/7/2010, Stephen Sunderlin wrote:
>Can't get slow querys to log. Does this not work in myisam?

Sure it does. Have you tried:

slow_query_time = 1

Mike


>*snip*
>[mysqld]
>log-slow-queries = /var/log/mysql/mysql-slow.log
>long_query_time = 1
>*snip*
>
>restarted mysqld - no log.
>
>Created in file in /var/log/mysql/
>
>*snip*
>-rwxr--r-- 1 mysql mysql 0 May 7 10:33 mysql-slow.log
>*snip*
>
>still not writing to the file
>
>I've read
>http://dev.mysql.com/doc/refman/5.0/en/slow-query-log.html
>http://www.mydigitallife.info/2007/01/22/enable-logging-of- slow-queries-slow-query-log-in-mysql-database/
>
>
>looks pretty simple - not sure what I'm missing.
>
>Thanks!
>
>
>
>--
>MySQL General Mailing List
>For list archives: http://lists.mysql.com/mysql
>To unsubscribe: http://lists.mysql.com/mysql?unsub=mos99@fastmail.fm


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

Re: log-slow-queries

am 07.05.2010 23:16:49 von mos

At 03:58 PM 5/7/2010, you wrote:
>At 12:04 PM 5/7/2010, Stephen Sunderlin wrote:
>>Can't get slow querys to log. Does this not work in myisam?
>
>Sure it does. Have you tried:
>
>slow_query_time = 1
>
>Mike

Sorry, ignore that previous message. (Serves me right for trying to
remember it from the top of my head.)

I'm using (Windows):

general_log=0
log-output=FILE
log_queries_not_using_indexes=1
long_query_time=3
slow_query_log=1
slow_query_log_file="U:/mysql5.5/data/SLOWLOG.TXT"

I assume you are outputting the slow query log to a text file and not to a
table.

Mike


>>*snip*
>>[mysqld]
>>log-slow-queries = /var/log/mysql/mysql-slow.log
>>long_query_time = 1
>>*snip*
>>
>>restarted mysqld - no log.
>>
>>Created in file in /var/log/mysql/
>>
>>*snip*
>>-rwxr--r-- 1 mysql mysql 0 May 7 10:33 mysql-slow.log
>>*snip*
>>
>>still not writing to the file
>>
>>I've read
>>http://dev.mysql.com/doc/refman/5.0/en/slow-query-log.html
>>http://www.mydigitallife.info/2007/01/22/enable-logging-of -slow-queries-slow-query-log-in-mysql-database/
>>
>>
>>looks pretty simple - not sure what I'm missing.
>>
>>Thanks!
>>
>>
>>
>>--
>>MySQL General Mailing List
>>For list archives: http://lists.mysql.com/mysql
>>To unsubscribe: http://lists.mysql.com/mysql?unsub=mos99@fastmail.fm
>
>
>--
>MySQL General Mailing List
>For list archives: http://lists.mysql.com/mysql
>To unsubscribe: http://lists.mysql.com/mysql?unsub=mos99@fastmail.fm


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=gcdmg-mysql-2@m.gmane.org

Re: log-slow-queries

am 08.05.2010 07:12:18 von Anirudh Sundar

--0016e68ba208495a2404860e38a6
Content-Type: text/plain; charset=ISO-8859-1

Hello Stephen,

Did u try this ??

mysql> show global variables like '%log_output%';
+---------------+-------+
| Variable_name | Value |
+---------------+-------+
| log_output | FILE |
+---------------+-------+

If only the log_output is FILE, then the slow queries will get logged in the
log.
mysql> set global log_output = FILE; [if you find log_output as TABLE or
NONE]

Let me know if you have any issues...

Cheers,
Anirudh Sundar


On Fri, May 7, 2010 at 10:34 PM, Stephen Sunderlin <
Stephen.Sunderlin@verizon.net> wrote:

> Can't get slow querys to log. Does this not work in myisam?
>
> *snip*
> [mysqld]
> log-slow-queries = /var/log/mysql/mysql-slow.log
> long_query_time = 1
> *snip*
>
> restarted mysqld - no log.
>
> Created in file in /var/log/mysql/
>
> *snip*
> -rwxr--r-- 1 mysql mysql 0 May 7 10:33 mysql-slow.log
> *snip*
>
> still not writing to the file
>
> I've read
> http://dev.mysql.com/doc/refman/5.0/en/slow-query-log.html
>
> http://www.mydigitallife.info/2007/01/22/enable-logging-of-s low-queries-slow-query-log-in-mysql-database/
>
>
> looks pretty simple - not sure what I'm missing.
>
> Thanks!
>
>
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:
> http://lists.mysql.com/mysql?unsub=sundar.anirudh@gmail.com
>
>

--0016e68ba208495a2404860e38a6--