MySQL Lists are EOL. Please join:

List:General Discussion« Previous MessageNext Message »
From:Jeremy Zawodny Date:July 7 2004 6:03pm
Subject:Re: Script to purge
View as plain text  
On Wed, Jul 07, 2004 at 07:42:46PM +0200, Luis Mediero wrote:
> Hi,
> 
> 	I would like write a script to purge every nigth the master log with a cron
> process. I need do it every nigth after load a lot of data into the master.
> I know if i do 'show master status' i can see the file_name of the last log
> file and then do -purge master logs to 'file_name'-. Is possible put the
> file name into a variable and then do - purge master logs to '$variable' -,
> into a script?. Someone have a example?.
> 
> 	I can't use 'PURGE MASTER LOGS BEFORE ....' because I use the 4.0.20
> version. :-(

Chapter 7 of "High Performance MySQL" covers this.  And it's even
availble free on-line:

  http://dev.mysql.com/books/hpmysql-excerpts/ch07.html

You'll find Perl script that does that.

Jeremy
-- 
Jeremy D. Zawodny     |  Perl, Web, MySQL, Linux Magazine, Yahoo!
<Jeremy@stripped>  |  http://jeremy.zawodny.com/

[book] High Performance MySQL -- http://highperformancemysql.com/
Thread
Script to purgeLuis Mediero7 Jul
  • Re: Script to purgegerald_clark7 Jul
  • Re: Script to purgeJeremy Zawodny7 Jul
  • RE: Script to purgeMark Steele9 Jul