Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I found in the slow queries log there are a bunch of these logs, what exactly does it mean? It looks like mysql is keep restarting itself? I'm using mysql 5.0.77. Any idea what might be causing this? Thanks!

/usr/libexec/mysqld, Version: 5.0.77-log (Source distribution). started with:
Tcp port: 3306  Unix socket: /var/lib/mysql/mysql.sock
Time                 Id Command    Argument
/usr/libexec/mysqld, Version: 5.0.77-log (Source distribution). started with:
Tcp port: 3306  Unix socket: /var/lib/mysql/mysql.sock
Time                 Id Command    Argument
/usr/libexec/mysqld, Version: 5.0.77-log (Source distribution). started with:
Tcp port: 3306  Unix socket: /var/lib/mysql/mysql.sock
Time                 Id Command    Argument
share|improve this question

2 Answers 2

This happens in two situations. Something executed a FLUSH LOGS statement which causes mysqld to close and reopen all logs, including the slow log.

Alternatively, something sent a SIGHUP signal to mysqld. This too causes mysqld to close and reopen logs. A SIGHUP is commonly sent by logrotate when it performs log rotation.

share|improve this answer

Most likely what is happening is that your log rotation process is asking mysql to start new logs, but it isn't actually rotating the slow query log to a new file. This could be because it is set to a minimum log size or just doesn't know about the file. The MySQL docs have some information about log rotation, but most distributions use a systemwide tool to handle all the rotation for all the different servers and logs at once. For instance, Debian uses logrotate which is configured with the list of mysql log files in /etc/logrotate.d/mysql-server

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.