]>
Commit | Line | Data |
---|---|---|
1 | # This section is used from mysqld.conf for logrotation. | |
2 | # Be sure that the password in config matches the actual one. | |
3 | # | |
4 | # ATTENTION: The mysqld.conf should be readable ONLY for *system* root! | |
5 | # | |
6 | # [mysqladmin] | |
7 | # user = mysql_sysadmin | |
8 | # password = <secret> | |
9 | # | |
10 | # where "<secret>" is the password. | |
11 | # | |
12 | # You must do this for every active cluster defined in /etc/mysql/clusters.conf | |
13 | ||
14 | /var/log/mysql{MYSQL_MAJOR}/query.log | |
15 | /var/log/mysql{MYSQL_MAJOR}/mysqld.log | |
16 | /var/log/mysql{MYSQL_MAJOR}/slow.log | |
17 | /var/log/mysql{MYSQL_MAJOR}/update* | |
18 | { | |
19 | olddir /var/log/archive/mysql{MYSQL_MAJOR} | |
20 | notifempty | |
21 | missingok | |
22 | create 640 mysql mysql | |
23 | sharedscripts | |
24 | ||
25 | # NOTE: | |
26 | # if you run the rotation less often than "daily" then the | |
27 | # "expire-logs-days" mysqld server parameter may no longer work as you | |
28 | # expect | |
29 | daily | |
30 | ||
31 | postrotate | |
32 | /sbin/service mysql{MYSQL_MAJOR} flush-logs | |
33 | endscript | |
34 | } |