You shouldn't have to flush the logs manually. I have been flushing binary logs using this expire_logs_days for some time with no other intervention.
One thing to keep in mind is that if you have limited disk space, and an usual spike in updates your binary logs can still grow and consume all available disk space if you are not keeping tabs on available disk space when using the expire_logs_days directive or a cron job. Depending on your volume of traffic or the size of the volume this may not be an issue. Ben Wiechman Network Admin Wisper High Speed Internet > -----Original Message----- > From: Jim Lyons [mailto:[EMAIL PROTECTED] > Sent: Wednesday, October 08, 2008 10:51 AM > To: Zbigniew Szalbot > Cc: mysql@lists.mysql.com > Subject: Re: mysql binlogs and their expiry times > > According to the doc for this parameter, "Possible removals happen at > startup and at binary log rotation." This implies that removal is not > automatic - you have to either flush logs or bounce the server. We use > "Purge Master" periodically. > > On Wed, Oct 8, 2008 at 3:10 AM, Zbigniew Szalbot <[EMAIL PROTECTED]> > wrote: > > > Hi there, > > > > I hope someone can help. Due to they way my HD has been sliced I had > > to move mysql database to /usr/local/mysql. All works fine. Last week > > I added this entry: > > > > #expire bin logs > > expire_logs_days = 7 > > > > to /usr/local/mysql/my.cnf > > > > I restarted the MySQL server and now I have been waiting for the > > binlogs to automatically expire but this is not happening: > > > > $ ls -l /usr/local/mysql > > > > -r--r--r-- 1 mysql mysql 4954 Oct 1 07:30 my.cnf > > drwx------ 2 mysql mysql 1536 Sep 27 07:10 mysql > > -rw-rw---- 1 mysql mysql 1073745213 Sep 2 04:07 mysql-bin.000047 > > -rw-rw---- 1 mysql mysql 1073746878 Sep 7 03:48 mysql-bin.000048 > > -rw-rw---- 1 mysql mysql 1073745707 Sep 11 20:07 mysql-bin.000049 > > -rw-rw---- 1 mysql mysql 175527890 Sep 12 08:32 mysql-bin.000050 > > -rw-rw---- 1 mysql mysql 128272 Sep 12 08:40 mysql-bin.000051 > > -rw-rw---- 1 mysql mysql 1073745119 Sep 17 04:35 mysql-bin.000052 > > -rw-rw---- 1 mysql mysql 1073747657 Sep 22 04:26 mysql-bin.000053 > > -rw-rw---- 1 mysql mysql 1073744456 Sep 27 03:28 mysql-bin.000054 > > -rw-rw---- 1 mysql mysql 986782722 Oct 1 07:32 mysql-bin.000055 > > -rw-rw---- 1 mysql mysql 1073742442 Oct 6 04:18 mysql-bin.000056 > > -rw-rw---- 1 mysql mysql 536487381 Oct 8 07:45 mysql-bin.000057 > > -rw-r----- 1 mysql mysql 209 Oct 6 04:18 mysql-bin.index > > > > Do you have any idea why? Or if /usr/local/mysql/ is a correct > > location for my.cnf file? Perhaphs it should go to /usr/local/etc/ ? > > > > If it matters, I use mysql-server-5.0.67 on FreeBSD 7.0-Release machine. > > > > Many thanks! > > > > -- > > Zbigniew Szalbot > > > > -- > > MySQL General Mailing List > > For list archives: http://lists.mysql.com/mysql > > To unsubscribe: > http://lists.mysql.com/[EMAIL PROTECTED] > > > > > > > -- > Jim Lyons > Web developer / Database administrator > http://www.weblyons.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]