mysql log rotation

mysql log rotation

am 04.01.2011 20:20:39 von Atle Veka

MySQL: Ver 5.0.51a-24+lenny4-log for debian-linux-gnu on x86_64 ((Debian))

Hi, I am looking for alternate methods to rotate the query and slow query
logs. Currently we employ the following method, in psedu code:

sh# rename mysql.log mysql.log.foo
mysql> FLUSH LOGS;
sh# move mysql.log.foo /backup/

The above method unfortunately is not very reliable. Mysql will
occasionally fail to restart mysql.log and error out after shutting off
logging:
110104 5:00:01 [ERROR] Could not use /usr/local/mysql-1/mysqld.log
for logging (error 13). Turning logging off for the whole duration of the
MySQL server process. To turn it on again: fix the cause, shutdown the
MySQL server and restart it.

I'm looking for either solutions to this problem or alternate, more
reliable, methods to accurately rotate the log data.


Regards,
Atle

--
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