Getting rid of bin files

Getting rid of bin files

am 29.06.2005 10:40:30 von Chris Robinson

Hi all,

I have a program that uses MySQL as a backend database. I get a large
amount of bin files in the MySQL data directory called "servername-bin.x",
where x is a number that increments.

How do I stop these files being created? They take up a LOT of room (each
one is about 1Gb). I found out how to purge them, which I'm currently
doing manually:

mysql -u root -p XXXXXXX -e "PURGE MASTER LOGS TO 'servername-bin.10';"

I don't want to have to keep doing this manually though, I'd rather they
weren't created in the first place. I'm running MySQL 4.0.17 on Windows
2000 server.

Thanks in advance,
Chris.


--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32@m.gmane.org

RE: Getting rid of bin files

am 29.06.2005 14:53:48 von paulo.urcid

Chris, check your my.cnf or my.ini file and you will probable see a =
line
that says "log-bin". This line tells the MySQL server to store all =
movements
(inserts, updates, deletes, etc.) in binary logs (those files you are
purging are the logs). You can simply comment or erase that line from =
your
configuration file and restart the MySQL server.

Good luck

Paulo

-----Mensaje original-----
De: Chris Robinson [mailto:crobinson@manchester.actaris.com]=20
Enviado el: Mi=E9rcoles, 29 de Junio de 2005 03:41 a.m.
Para: win32@lists.mysql.com
Asunto: Getting rid of bin files

Hi all,

I have a program that uses MySQL as a backend database. I get a large=20
amount of bin files in the MySQL data directory called =
"servername-bin.x",=20
where x is a number that increments.

How do I stop these files being created? They take up a LOT of room =
(each=20
one is about 1Gb). I found out how to purge them, which I'm currently=20
doing manually:

mysql -u root -p XXXXXXX -e "PURGE MASTER LOGS TO 'servername-bin.10';"

I don't want to have to keep doing this manually though, I'd rather =
they=20
weren't created in the first place. I'm running MySQL 4.0.17 on =
Windows=20
2000 server.

Thanks in advance,
Chris.


--=20
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Durcid@vw.com.mx

--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Dgcdmw-win32@m.gmane.org

Re: Getting rid of bin files

am 29.06.2005 15:41:19 von SGreen

--=_alternative 004B85438525702F_=
Content-Type: text/plain; charset="US-ASCII"

Chris Robinson wrote on 06/29/2005
04:40:30 AM:

> Hi all,
>
> I have a program that uses MySQL as a backend database. I get a large
> amount of bin files in the MySQL data directory called
"servername-bin.x",
> where x is a number that increments.
>
> How do I stop these files being created? They take up a LOT of room
(each
> one is about 1Gb). I found out how to purge them, which I'm currently
> doing manually:
>
> mysql -u root -p XXXXXXX -e "PURGE MASTER LOGS TO 'servername-bin.10';"
>
> I don't want to have to keep doing this manually though, I'd rather they

> weren't created in the first place. I'm running MySQL 4.0.17 on Windows

> 2000 server.
>
> Thanks in advance,
> Chris.
>

As you have discovered, those BIN files are the binlogs used for
replication. If you are not replicating, you can disable binlogging by
changing your my.ini file. If you ARE replicating, then you need to
periodically RESET MASTER or PURGE MASTER LOGS to clear out the old logs
(as you are already doing) as those files are necessary for the proper
operation of replication.

Documentation here:
http://dev.mysql.com/doc/mysql/en/binary-log.html
http://dev.mysql.com/doc/mysql/en/reset.html
http://dev.mysql.com/doc/mysql/en/purge-master-logs.html

Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine
--=_alternative 004B85438525702F_=--

RE: Getting rid of bin files

am 30.06.2005 08:35:35 von Chris Robinson

Thanks Paulo & Shawn,

I've commented the line out & stopped/ restarted the server so hopefully=20
that'll sort it out :o) Thanks also for the useful links for further=
reading.

Much appreciated,
Chris.

At 13:53 29/06/2005, Urcid Pliego, Paulo wrote:
>Chris, check your my.cnf or my.ini file and you will probable see a line
>that says "log-bin". This line tells the MySQL server to store all=
movements
>(inserts, updates, deletes, etc.) in binary logs (those files you are
>purging are the logs). You can simply comment or erase that line from your
>configuration file and restart the MySQL server.
>
>Good luck
>
>Paulo
>
>-----Mensaje original-----
>De: Chris Robinson [mailto:crobinson@manchester.actaris.com]
>Enviado el: Mi=E9rcoles, 29 de Junio de 2005 03:41 a.m.
>Para: win32@lists.mysql.com
>Asunto: Getting rid of bin files
>
>Hi all,
>
>I have a program that uses MySQL as a backend database. I get a large
>amount of bin files in the MySQL data directory called "servername-bin.x",
>where x is a number that increments.
>
>How do I stop these files being created? They take up a LOT of room (each
>one is about 1Gb). I found out how to purge them, which I'm currently
>doing manually:
>
>mysql -u root -p XXXXXXX -e "PURGE MASTER LOGS TO 'servername-bin.10';"
>
>I don't want to have to keep doing this manually though, I'd rather they
>weren't created in the first place. I'm running MySQL 4.0.17 on Windows
>2000 server.
>
>Thanks in advance,
>Chris.
>
>
>--
>MySQL Windows Mailing List
>For list archives: http://lists.mysql.com/win32
>To unsubscribe: http://lists.mysql.com/win32?unsub=3Durcid@vw.com.mx


--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=3Dgcdmw-win32@m.gmane.org