wok diff mariadb/stuff/etc/logrotate.d/mysql @ rev 13054
Add: mariadb
author | Eric Joseph-Alexandre <erjo@slitaz.org> |
---|---|
date | Wed Jun 20 15:35:34 2012 +0200 (2012-06-20) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/mariadb/stuff/etc/logrotate.d/mysql Wed Jun 20 15:35:34 2012 +0200 1.3 @@ -0,0 +1,36 @@ 1.4 +# This logname can be set in /etc/my.cnf 1.5 +# by setting the variable "err-log" 1.6 +# in the [safe_mysqld] section as follows: 1.7 +# 1.8 +# [safe_mysqld] 1.9 +# err-log=/var/lib/mysql/mysqld.log 1.10 +# 1.11 +# If the root user has a password you have to create a 1.12 +# /root/.my.cnf configuration file with the following 1.13 +# content: 1.14 +# 1.15 +# [mysqladmin] 1.16 +# password = <secret> 1.17 +# user= root 1.18 +# 1.19 +# where "<secret>" is the password. 1.20 +# 1.21 +# ATTENTION: This /root/.my.cnf should be readable ONLY 1.22 +# for root ! 1.23 + 1.24 +/var/lib/mysql/mysqld.log { 1.25 + # create 600 mysql mysql 1.26 + notifempty 1.27 + daily 1.28 + rotate 3 1.29 + missingok 1.30 + compress 1.31 + postrotate 1.32 + # just if mysqld is really running 1.33 + if test -x /usr/bin/mysqladmin && \ 1.34 + /usr/bin/mysqladmin ping &>/dev/null 1.35 + then 1.36 + /usr/bin/mysqladmin flush-logs 1.37 + fi 1.38 + endscript 1.39 +}