MySQL Slow Log Missing SQL statements

Hi,

I use pingdom to do basic monitoring of my website and have been noticing a steady march upward for response time. I assume the issue is with my database, so I went to look at my the mysql-slow.log file and see the same three lines repeated with no SQL statements; not exactly helpful.

/usr/sbin/mysqld, Version: 5.1.41-3ubuntu12.6-log ((Ubuntu)). started with:
Tcp port: 3306  Unix socket: /var/run/mysqld/mysqld.sock
Time                 Id Command    Argument

Here is a snippet from the my.cnf file:

log_slow_queries    = /var/log/mysql/mysql-slow.log
long_query_time = 2
log-queries-not-using-indexes

I have just tried changing permissions on the files and directory and restarted mysql with no luck. I still am getting new additions to the mysql-slow.log file, but nothing useful. My current permissions are:

:/var/log/mysql$ ls -al
total 31772
drwxrws--- 2 mysql mysql     4096 Aug 26 06:25 .
drwxr-xr-x 7 root  root      4096 Aug 26 06:25 ..
-rw-rw---- 1 mysql mysql 32193324 Aug 27 02:12 error.log
-rw-rw---- 1 mysql mysql   125493 Aug 27 02:11 mysql-slow.log

Any suggestions for what I am missing?

Thanks, Josh

2 Replies

Maybe there really were no slow queries. It's easy enough to test; just run a

SELECT SLEEP(3);

and see if it shows up in the log.

Thanks. I tried this and do not see this query in the log file. Any other suggestions?

I also noticed that this log file was rotated and the group reverted back to be "adm" instead of the "mysql" group I changed it to yesterday. Could this be part of the issue?

-rw-r----- 1 mysql adm     107793 Aug 27 23:21 mysql-slow.log

Thanks, Josh

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct