X-Git-Url: https://git.pld-linux.org/?a=blobdiff_plain;f=mysql.logrotate;h=988c60d22450da71e1981856d142e7b53d2bff49;hb=e0cc68c06eeb7ccf0d36d73743dea2de1945ba86;hp=017c1ec4ee0b6f96bf8b9c773cef3d6465468435;hpb=2f1b7dcf956fad94f9751d21b7cc89f1aec2afcb;p=packages%2Fmysql.git diff --git a/mysql.logrotate b/mysql.logrotate index 017c1ec..988c60d 100644 --- a/mysql.logrotate +++ b/mysql.logrotate @@ -1,61 +1,21 @@ -/var/log/mysql/err { +# If the *mysql* root user has a password you have to set it in mysqld.conf +# +# [mysqladmin] +# user = mysql_logrotate +# password = +# +# where "" is the password. +# +# You must do this for every cluster defined in /etc/mysql/clusters.conf +# +# ATTENTION: The mysqld.conf should be readable ONLY for *system* root! + +/var/log/mysql/log /var/log/mysql/isamlog.log /var/log/mysql/update* { olddir /var/log/archiv/mysql - notifempty + notifempty create 640 mysql mysql - prerotate - /usr/bin/mysqladmin --defaults-file=/etc/mysqld.conf flush-logs - endscript - - postrotate - /usr/bin/mysqladmin --defaults-file=/etc/mysqld.conf flush-logs - endscript -} - -/var/log/mysql/log { - olddir /var/log/archiv/mysql - notifempty - missingok - create 640 mysql mysql - - prerotate - /usr/bin/mysqladmin --defaults-file=/etc/mysqld.conf flush-logs - endscript - + sharedscripts postrotate - /usr/bin/mysqladmin --defaults-file=/etc/mysqld.conf flush-logs + /etc/rc.d/init.d/mysql flush-logs endscript } - -/var/log/mysql/isamlog.log { - olddir /var/log/archiv/mysql - notifempty - missingok - daily - create 640 mysql mysql - - prerotate - /usr/bin/mysqladmin --defaults-file=/etc/mysqld.conf flush-logs - endscript - - postrotate - /usr/bin/mysqladmin --defaults-file=/etc/mysqld.conf flush-logs - endscript -} - -/var/log/mysql/update* { - olddir /var/log/archiv/mysql - notifempty - missingok - create 640 mysql mysql - - prerotate - /usr/bin/mysqladmin --defaults-file=/etc/mysqld.conf flush-logs - endscript - - postrotate - /usr/bin/mysqladmin --defaults-file=/etc/mysqld.conf flush-logs - endscript -} - - -