-/var/log/mysql/err {
- notifempty
+# If the *mysql* root user has a password you have to set it in mysqld.conf
+#
+# [mysqladmin]
+# user = mysql_logrotate
+# password = <secret>
+#
+# where "<secret>" 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
create 640 mysql mysql
- prerotate
- /usr/bin/mysqladmin --defaults-file=$MYSQLD_CONFIG flush-logs
- endscript
-
- postrotate
- /usr/bin/mysqladmin --defaults-file=$MYSQLD_CONFIG flush-logs
- endscript
-}
-
-/var/log/mysql/log {
- notifempty
- missingok
- create 640 mysql mysql
-
- prerotate
- /usr/bin/mysqladmin --defaults-file=$MYSQLD_CONFIG flush-logs
- endscript
-
+ sharedscripts
postrotate
- /usr/bin/mysqladmin --defaults-file=$MYSQLD_CONFIG flush-logs
+ /etc/rc.d/init.d/mysql flush-logs
endscript
}
-
-/var/log/mysql/isamlog {
- notifempty
- missingok
- create 640 mysql mysql
-
- prerotate
- /usr/bin/mysqladmin --defaults-file=$MYSQLD_CONFIG flush-logs
- endscript
-
- postrotate
- /usr/bin/mysqladmin --defaults-file=$MYSQLD_CONFIG flush-logs
- endscript
-}
-