mysql_slow_query_rotate
logrotate -fv /etc/logrotate.d/mysqldLogrotate file:
/san/mysqllogs/slowlogs/slow-log {
create 640 mysql mysql
notifempty
daily
rotate 5
missingok
#compress
postrotate
# just if mysqld is really running
if test -x /usr/bin/mysqladmin && \
/usr/bin/mysqladmin --defaults-file=/root/.my.cnf ping &>/dev/null
then
/usr/bin/mysqladmin --defaults-file=/root/.my.cnf flush-logs
fi
endscript
}
mysql_slow_query_rotate.txt · Last modified: 2024/05/23 07:26 by 127.0.0.1
