wok annotate mariadb/stuff/etc/logrotate.d/mysql @ rev 24908
updated mjpegtools and mjpegtools-dev (2.1.0 -> 2.2.1)
author | Hans-G?nter Theisgen |
---|---|
date | Sat Apr 09 15:21:07 2022 +0100 (2022-04-09) |
parents | |
children |
rev | line source |
---|---|
erjo@13054 | 1 # This logname can be set in /etc/my.cnf |
erjo@13054 | 2 # by setting the variable "err-log" |
erjo@13054 | 3 # in the [safe_mysqld] section as follows: |
erjo@13054 | 4 # |
erjo@13054 | 5 # [safe_mysqld] |
erjo@13054 | 6 # err-log=/var/lib/mysql/mysqld.log |
erjo@13054 | 7 # |
erjo@13054 | 8 # If the root user has a password you have to create a |
erjo@13054 | 9 # /root/.my.cnf configuration file with the following |
erjo@13054 | 10 # content: |
erjo@13054 | 11 # |
erjo@13054 | 12 # [mysqladmin] |
erjo@13054 | 13 # password = <secret> |
erjo@13054 | 14 # user= root |
erjo@13054 | 15 # |
erjo@13054 | 16 # where "<secret>" is the password. |
erjo@13054 | 17 # |
erjo@13054 | 18 # ATTENTION: This /root/.my.cnf should be readable ONLY |
erjo@13054 | 19 # for root ! |
erjo@13054 | 20 |
erjo@13054 | 21 /var/lib/mysql/mysqld.log { |
erjo@13054 | 22 # create 600 mysql mysql |
erjo@13054 | 23 notifempty |
erjo@13054 | 24 daily |
erjo@13054 | 25 rotate 3 |
erjo@13054 | 26 missingok |
erjo@13054 | 27 compress |
erjo@13054 | 28 postrotate |
erjo@13054 | 29 # just if mysqld is really running |
erjo@13054 | 30 if test -x /usr/bin/mysqladmin && \ |
erjo@13054 | 31 /usr/bin/mysqladmin ping &>/dev/null |
erjo@13054 | 32 then |
erjo@13054 | 33 /usr/bin/mysqladmin flush-logs |
erjo@13054 | 34 fi |
erjo@13054 | 35 endscript |
erjo@13054 | 36 } |