Many Thanks to Dobromir Velev,
And for those without PERL but with PHP (or prefer PHP) here is a quick and
dirty port to PHP
REMEMBER TO MAKE A BACKUP OF YOUR FILES BEFORE TESTING OR USING THIS
SCRIPT
IT IS RECOMMENDED YOU TEST THIS SCRIPT IN A NON PRODUCTION ENVIRONMENT
FIRST **
Here it is
#!/usr/bin/perl
use strict;
use DBI;
my $db_host="localhost";
my $db_user="username";
my $db_pass="password";
my $db_name="database";
my $mail_prog = '/usr/lib/sendmail';
my $email='[EMAIL PROTECTED]';
my $from_email='[EMAIL PROTECTED]';
sub mysql_die{
if ($_[0]){ print $_[0]."
Hi,
There is a thing I forgot to mention in my previous email - if you are
replicating your database please follow the steps described in
http://dev.mysql.com/doc/mysql/en/PURGE_MASTER_LOGS.html
or you might end with missing data on your slave servers. A binary log should
not be deleted unless
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On Thursday 10 June 2004 08:03 am, Josh Trutwin wrote:
> Would you be willing to share your perl script? Perhaps offlist if you are
> concerned about everyone seeing it?
I would like to see it as well.. If at all possible
- --
How
On Thu, 10 Jun 2004 15:55:31 +0300
Dobromir Velev <[EMAIL PROTECTED]> wrote:
> I've made a simple perl script that uses the
>
> show master logs
>
> and
>
> purge master logs to 'mysql.???'
>
> queries to remove all but the last seven logs and it works perfectly
> for me.
Would you be willi
I've made a simple perl script that uses the
show master logs
and
purge master logs to 'mysql.???'
queries to remove all but the last seven logs and it works perfectly for me.
Check http://dev.mysql.com/doc/mysql/en/PURGE_MASTER_LOGS.html for details.
--
Dobromir Velev
[EMAIL PROTECTED]
ht
S?ren Neigaard <[EMAIL PROTECTED]> wrote:
> I have a MySQL (mysql-standard-4.0.17-pc-linux-i686) running as master =
> where I have attached a slave to for replication. The problem now is =
> that on the master there is a LOT of mysql-bin.XXX files, and they each =
> take 1GB diskplace.
>
> Are t