# This section is used from mysqld.conf for logrotation.
# Be sure that the password in config matches the actual one.
#
# ATTENTION: The mysqld.conf should be readable ONLY for *system* root!
#
# [mysqladmin]
# user = mysql_sysadmin
# password = <secret>
#
# where "<secret>" is the password.
#
# You must do this for every active cluster defined in /etc/mysql/clusters.conf

/var/log/percona-server/query.log
/var/log/percona-server/mysqld.log
/var/log/percona-server/slow.log
/var/log/percona-server/update*
{
	olddir /var/log/archive/percona-server
	notifempty
	missingok
	create 640 mysql mysql
	sharedscripts

	# NOTE:
	# if you run the rotation less often than "daily" then the
	# "expire-logs-days" mysqld server parameter may no longer work as you
	# expect
	daily

	postrotate
		/sbin/service percona-server flush-logs
	endscript
}
