I have one free ticket to give away to RailsConf next week in Baltimore! Post a comment to win, and if you aren’t the winner, I’ll give you a discount code for Percona Live as a consolation prize.
Here’s the catch: you have to find at least one thing wrong with the following typical logrotate configuration for MySQL. This should be easy even if you’re not a MySQL expert ![]()
|
1 |
# This logname can be set in /etc/my.cnf<br># by setting the variable "err-log"<br># in the [safe_mysqld] section as follows:<br>#<br># [safe_mysqld]<br># err-log=/var/lib/mysql/mysqld.log<br>#<br># If the root user has a password you have to create a<br># /root/.my.cnf configuration file with the following<br># content:<br>#<br># [mysqladmin]<br># password = <secret><br># user= root<br>#<br># where "<secret>" is the password.<br>#<br># ATTENTION: This /root/.my.cnf should be readable ONLY<br># for root !<br><br>/var/lib/mysql/mysqld.log {<br> create 600 mysql mysql<br> notifempty<br> daily<br> rotate 3<br> missingok<br> compress<br> postrotate<br> # just if mysqld is really running<br> if test -x /usr/bin/mysqladmin && <br> /usr/bin/mysqladmin ping &>/dev/null<br> then<br> /usr/bin/mysqladmin flush-logs<br> fi<br> endscript<br>} |