]> git.pld-linux.org Git - packages/mysql.git/blobdiff - mysql.logrotate
- update files (partial)
[packages/mysql.git] / mysql.logrotate
index 7f872089d052a0fd4729603dbd50379b375b54ce..4bb78ceb9acd84287db5a16baef4e66400b9d1a3 100644 (file)
@@ -1,5 +1,34 @@
-/var/log/mysqld.log {
+# This section is used from mysqld.conf for logrotation.
+# Be sure that the password in config matches the actual one.
+#
+# ATTENTION: The mysqld.conf should be readable ONLY for *system* root!
+#
+# [mysqladmin]
+# user = mysql_sysadmin
+# password = <secret>
+#
+# where "<secret>" is the password.
+#
+# You must do this for every active cluster defined in /etc/mysql/clusters.conf
+
+/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 restart
+               /sbin/service mysql flush-logs
        endscript
 }
This page took 0.105749 seconds and 4 git commands to generate.