Several files over 1GB in my /var - What are they?

jasgot

Well-Known Member
Mar 2, 2004
78
5
158
I have a bunch of files in /var/lib/mysql

They are named like this:

christopher-bin.000001
christopher-bin.000002
christopher-bin.000003
christopher-bin.000004
...
christopher-bin.000008

They are dated about every 9 or 10 days.

Any idea what they are? How they got there? Can I delete them?

They are occupying 50% of my /var volume.....

Thanks.
Jason
 

jasgot

Well-Known Member
Mar 2, 2004
78
5
158
I did a "cat" to one of them. They appear to be millions of mysql insert commands from my MailScanner spam and virus system.

Can I get rid of these? or change where they are stored?
 

viraj

Well-Known Member
Sep 28, 2006
209
3
168
India
cPanel Access Level
DataCenter Provider
Twitter
Hi Jason,

These are the binary log files needed if you are using/running a MySQL database cluster, these are needed for replication from Master to Slave & vice versa. If you aren't, then you can proceed with the deletion of those files & to stop them of occurring follow these steps :

1) Edit the MySQL configuration file : vi /etc/my.cnf
2) Search for log-bin entry & remove or comment it.
3) Save the config file & restart MySQL.

You are done :)
 

jasgot

Well-Known Member
Mar 2, 2004
78
5
158
Hi Jason,

These are the binary log files needed if you are using/running a MySQL database cluster, these are needed for replication from Master to Slave & vice versa. If you aren't, then you can proceed with the deletion of those files & to stop them of occurring follow these steps :

1) Edit the MySQL configuration file : vi /etc/my.cnf
2) Search for log-bin entry & remove or comment it.
3) Save the config file & restart MySQL.

You are done :)
GREAT! Thank you! I just backed them up and deleted them.