NYCPHP Meetup

NYPHP.org

[nycphp-talk] MySQL slow query log/general mysql log

Donald J. Organ IV dorgan at donaldorgan.com
Tue Sep 7 14:51:02 EDT 2010


Just edit the logrotate config for the mysql logs and change the create line. 







From: "Anthony Wlodarski" <anthony at dating2p0.com> 
To: "NYPHP Talk" <talk at lists.nyphp.org> 
Sent: Tuesday, September 7, 2010 2:43:51 PM 
Subject: Re: [nycphp-talk] MySQL slow query log/general mysql log 

MySQL does rotate the slow query log at least on my systems it is automated. I did a quick look at the MySQL man pages just to verify if it does behave this way but could not confirm. This could present a problem when MySQL goes to rotate it off. If it uses an internal "cp -p" then permissions and the such will just be copied to the backup logs. However I don't know if the original file is truncated or recreated. If it is recreated then MySQL will only recreate it with the default 640 permissions. If it is just truncated then you are in the clear but I am willing to be on the aforementioned. 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20100907/a465646e/attachment.html>


More information about the talk mailing list