X-Git-Url: https://git.pld-linux.org/?a=blobdiff_plain;f=mysql.logrotate;h=4bb78ceb9acd84287db5a16baef4e66400b9d1a3;hb=refs%2Fheads%2FMYSQL_5_6_GCC6;hp=988c60d22450da71e1981856d142e7b53d2bff49;hpb=e0cc68c06eeb7ccf0d36d73743dea2de1945ba86;p=packages%2Fmysql.git diff --git a/mysql.logrotate b/mysql.logrotate index 988c60d..4bb78ce 100644 --- a/mysql.logrotate +++ b/mysql.logrotate @@ -1,21 +1,34 @@ -# If the *mysql* root user has a password you have to set it in mysqld.conf +# This section is used from mysqld.conf for logrotation. +# Be sure that the password in config matches the actual one. # -# [mysqladmin] -# user = mysql_logrotate -# password = +# ATTENTION: The mysqld.conf should be readable ONLY for *system* root! # -# where "" is the password. +# [mysqladmin] +# user = mysql_sysadmin +# password = # -# You must do this for every cluster defined in /etc/mysql/clusters.conf +# where "" is the password. # -# ATTENTION: The mysqld.conf should be readable ONLY for *system* root! +# You must do this for every active cluster defined in /etc/mysql/clusters.conf -/var/log/mysql/log /var/log/mysql/isamlog.log /var/log/mysql/update* { - olddir /var/log/archiv/mysql +/var/log/mysql/query.log +/var/log/mysql/mysqld.log +/var/log/mysql/slow.log +/var/log/mysql/update* +{ + olddir /var/log/archive/mysql notifempty + missingok create 640 mysql mysql sharedscripts + + # NOTE: + # if you run the rotation less often than "daily" then the + # "expire-logs-days" mysqld server parameter may no longer work as you + # expect + daily + postrotate - /etc/rc.d/init.d/mysql flush-logs + /sbin/service mysql flush-logs endscript }