# If the root user has a password you have to alter the
# /root/.my.cnf configuration file with the following
# content:
#
# [mysqladmin]
# password = <secret> 
# user= root
#
# where "<secret>" is the password. 
#
# ATTENTION: This /root/.my.cnf file MUST be available
# for read and write ONLY for root !

/var/log/mysql/* {
	notifempty
	missingok
	daily
	rotate 3
	compress
	create 0664 root mysql
	prerotate
		if mysqladmin ping &>/dev/null; then mysqladmin flush-logs; fi
	endscript
	postrotate
		if mysqladmin ping &>/dev/null; then mysqladmin flush-logs; fi
	endscript

}

/var/lib/mysql/log/* {
	notifempty
	missingok
	daily
	rotate 3
	compress
	create 0664 root mysql
	prerotate
		if mysqladmin ping &>/dev/null; then mysqladmin flush-logs; fi
	endscript
	postrotate
		if mysqladmin ping &>/dev/null; then mysqladmin flush-logs; fi
	endscript
}
