Create a gist now

Instantly share code, notes, and snippets.

@suzutan /.my.cnf Secret
Created Oct 12, 2016

What would you like to do?
[mysqladmin]
password = password_here
user= root
cat /etc/logrotate.d/mariadb
/var/log/mariadb/error.log /var/log/mariadb/slow.log /var/log/mariadb/query.log {
create 600 mysql mysql
notifempty
daily
rotate 14
missingok
nocompress
dateext
sharedscripts
postrotate
# just if mysqld is really running
if test -x /usr/bin/mysqladmin && \
/usr/bin/mysqladmin ping &>/dev/null
then
/usr/bin/mysqladmin --defaults-extra-file=/root/.my.cnf flush-logs
fi
endscript
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment