Mailing List
Home
Forum Home
MySQL General - General MySQL discussion
MaxDB - Everything about MaxDB, formerly known as SAP DB
MySQL++ - Programming with the C++ API to MySQL
MySQL on Win32 - Runing MySQL on Windows 9x/Me/NT/2000/XP
ODBC - ODBC with the MySQL Connector/ODBC driver
Java Help - Mostly related to the MySQL Connector/J driver
Perl - Perl support for MySQL with DBI and DBD::mysql
GUI - MySQL GUI Tools
Announcement
Subjects
mysql openssl Question
mysql:it 's a db not a dbms how it 's possible?!
Does the binary log enabling affect the MySQL performances?
Strange behavior, Table Level Permission
FULLTEXT query format question
Preventing Duplicate Entries
Comparing and writing out BLOBS
Executing MySQL Commands From Within C Program
Can 't access mysql after kernel upgrade
Mysql 4 0 Oracle Stored Procedure Trigger Conversion
Downgrade Mysql from 4 to 3 23
MySQL Cluster Software
mysql test 4 1 fails with the gis test
ERROR 2002: Can 't connect to local MySQL server through socket
Getting Identity after INSERT
Update one field with more fields from another table
ERROR 1045: Access denied for user: 'root@localhost ' (Using
password: NO)
mysql have same function mthod as Oracle decode()
 
Relay-bin logs

Relay-bin logs

2006-06-28       - By Dan Buettner

 Back
Reply:     1     2     3     4     5     6  

Those do indeed have something to do with replication - they're a
record of all data manipulation commands (inserts, updates, deletes,
table creates and alters, etc).  The slaves basically read the
commands from those files in order to replicate what the master has
done.

You can purge them fairly easily.  The one gotcha is that you will
want to keep the most recent files around so that in case one or more
of your slaves fall behind, you're not purging the logs out from
underneath it.

See
http://dev.mysql.com/doc/refman/5.0/en/purge-master-logs.html

A nice command (taken from an example on that page) that gives you a
moving window of binary log info is something like:
PURGE MASTER LOGS BEFORE DATE_SUB( NOW( ), INTERVAL 31 DAY);

In my opinion running this command as a cron job or scheduled task is
a great solution in most situations, better than purging to a specific
file or purging them manually whenever you remember to (which is
usually about 5 minutes after you run out of disk space).

Dan



On 6/28/06, Dirk Bremer <Dirk.Bremer@(protected)> wrote:
> I'm using MySQL 4.1 and the master runs on a Windows 2000 server. This
> master replicates to several slaves.
>
> While browsing the data directory on the master, there are a lot of
> binary log files that are named:
>
> MasterName-relay-bin.999999 (where MasterName is the server-name and
> 999999 is a six-digit number)
>
> I have about 350 of these files and they all appear to be held open by
> the mater, i.e. they cannot be deleted from Windows. I assume that these
> files have something to do with replication.
>
> How can I purge these files to a more manageable number?
>
> Dirk Bremer - Senior Systems Engineer - ESS/AMS - NISC Lake St. Louis MO
> - USA Central Time Zone
> 636-755-2652 fax 636-755-2503
>
> dirk.bremer@(protected)
> www.nisc.coop
>
> --
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/mysql?unsub=drbuettner@(protected)
>
>

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/mysql?unsub=mysql@(protected)