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