RE: Rotating mysqld.log
From: Ramasubramanian [mailto:[EMAIL PROTECTED]] Hi, I tried to flush the logs but still the rotation doesn't happen. What else could be the problem ?? I get the same message again My config file read like this /var/log/mysqld.log { rotate 5 size=100k create 0644 mysql mysql postrotate if test -n `ps acx | grep mysql`;then /usr/bin/mysqladmin flush-logs fi endscript mail [EMAIL PROTECTED] missingok } I execute the config file as follows. /usr/sbin/logrotate -v /root/mysqlrotparams.conf I still get the old message reading config file mysqlrotparams.conf reading config info for /var/log/mysqld.log Handling 1 logs rotating pattern: /var/log/mysqld.log 102400 bytes (5 rotations) empty log files are rotated old logs mailed to [EMAIL PROTECTED] rotating file /var/log/mysqld.log log does not need rotating The last line would imply this is a logrotate issue. Try playing with the parameters - comment them out till something works. Greg This message and any attachment has been virus checked by Pfizer Corporate Information Technology, Sandwich. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Rotating mysqld.log
Hi All, I have a RH-7.2 server running mysql 3.23.41-1. I need to rotate the mysqld.log based on some size criteria. I have a config file as follows : mysqlrotparams.conf *** /var/log/mysqld.log { rotate 5 size=100k missingok create 0644 mysql mysql } I have configured a cron entry to execute this every one minute as follows. */1 * * * * /usr/sbin/logrotate -v mysqlrotparams.conf I increased the size of mysqld.log to 1200k but rotation didn't happen. The following was the output reading config file /root/mysqlrotparams.conf reading config info for /var/log/mysqld.log Handling 1 logs rotating pattern: /var/log/mysqld.log 102400 bytes (5 rotations) empty log files are rotated old logs mailed to [EMAIL PROTECTED] rotating file /var/log/mysqld.log log does not need rotating Can anyone help me in this regard ??? Thanks in advance. Regards Rams -- - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Rotating mysqld.log
You need to get logrotate to flush-logs otherwise mysql will still write to the old file. eg add after the create 0644 mysql mysql line: postrotate if test -n `ps acx | grep mysql`;then /path/to/mysqladmin -u logflusher -ppassword flush-logs fi endscript Assuming a mysql users called logflusher with password password has the flush privilege. Greg -Original Message- From: Ramasubramanian [mailto:[EMAIL PROTECTED]] Hi All, I have a RH-7.2 server running mysql 3.23.41-1. I need to rotate the mysqld.log based on some size criteria. I have a config file as follows : mysqlrotparams.conf *** /var/log/mysqld.log { rotate 5 size=100k missingok create 0644 mysql mysql } I have configured a cron entry to execute this every one minute as follows. */1 * * * * /usr/sbin/logrotate -v mysqlrotparams.conf I increased the size of mysqld.log to 1200k but rotation didn't happen. The following was the output reading config file /root/mysqlrotparams.conf reading config info for /var/log/mysqld.log Handling 1 logs rotating pattern: /var/log/mysqld.log 102400 bytes (5 rotations) empty log files are rotated old logs mailed to [EMAIL PROTECTED] rotating file /var/log/mysqld.log log does not need rotating Can anyone help me in this regard ??? Thanks in advance. Regards Rams -- - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php This message and any attachment has been virus checked by Pfizer Corporate Information Technology, Sandwich. - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
RE: Rotating mysqld.log
Hi, I tried to flush the logs but still the rotation doesn't happen. What else could be the problem ?? I get the same message again My config file read like this /var/log/mysqld.log { rotate 5 size=100k create 0644 mysql mysql postrotate if test -n `ps acx | grep mysql`;then /usr/bin/mysqladmin flush-logs fi endscript mail [EMAIL PROTECTED] missingok } I execute the config file as follows. /usr/sbin/logrotate -v /root/mysqlrotparams.conf I still get the old message reading config file mysqlrotparams.conf reading config info for /var/log/mysqld.log Handling 1 logs rotating pattern: /var/log/mysqld.log 102400 bytes (5 rotations) empty log files are rotated old logs mailed to [EMAIL PROTECTED] rotating file /var/log/mysqld.log log does not need rotating - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail [EMAIL PROTECTED] To unsubscribe, e-mail [EMAIL PROTECTED] Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php