ClearFoundation Tracker - ClearOS
View Issue Details
0001129ClearOSsystem-mysqlpublic2013-04-30 14:292014-06-23 10:43
user2 
user2 
normalminorhave not tried
closedfixed 
6.4.0 
6.5.0 Updates6.5.0 Updates 
0001129: System MySQL log does not rotate
The system MySQL log should be rotated!
No tags attached.
Issue History
2013-04-30 14:29user2New Issue
2013-04-30 14:29user2Issue generated from: 0000225
2013-04-30 14:29user2Assigned To => user2
2013-04-30 14:29user2Statusnew => confirmed
2013-05-01 05:07NickHNote Added: 0000837
2013-05-01 13:40NickHNote Added: 0000839
2013-07-29 13:57user2Target Version6.4.0 Updates => 6.5.0 Beta 1
2013-08-20 13:18user2Target Version6.5.0 Beta 1 => 6.5.0 Beta 2
2013-10-07 13:51user2Target Version6.5.0 Beta 2 => 6.5.0 Beta 3
2013-11-21 19:11user2Target Version6.5.0 Beta 3 => 6.5.0
2013-12-09 15:35user2Target Version6.5.0 => 6.6.0 Beta 1
2014-05-08 08:09user2Target Version6.6.0 Beta 1 => 6.6.0 Beta 2
2014-05-28 19:56user2Categoryapp-system-database - System Database => system-mysql
2014-05-28 19:56user2Statusconfirmed => resolved
2014-05-28 19:56user2Fixed in Version => 6.6.0 Beta 2
2014-05-28 19:56user2Resolutionopen => fixed
2014-06-10 20:10user2Statusresolved => closed
2014-06-23 10:43user2Fixed in Version6.6.0 Beta 2 => 6.5.0 Updates
2014-06-23 10:43user2Target Version6.6.0 Beta 2 => 6.5.0 Updates

Notes
(0000837)
NickH   
2013-05-01 05:07   
system-mysql.log used to rotate in 5.2 but with a logrotate function a bit different from normal logrotate functions:
 
/var/log/system-mysql/mysqld.log {
     missingok
     create 0640 system-mysql system-mysql
     prerotate
     [ -e /var/lock/subsys/system-mysqld ] && /bin/kill -HUP `cat /var/run/system-mysqld/system-mysqld.pid 2> /dev/null ` || /bin/true
     endscript
     postrotate
     [ -e /var/lock/subsys/system-mysqld ] && /bin/kill -HUP `cat /var/run/system-mysqld/system-mysqld.pid 2> /dev/null ` || /bin/true
     endscript
 }
(0000839)
NickH   
2013-05-01 13:40   
Another possible way of doing this without prerotate and postrotate scripts (which I don't fully understand) is to use the copytruncate function instead but there is apparently a minor risk of data loss with this function.