Tom Pyles

Well-Known Member
Apr 26, 2002
254
0
316
Our /var partition has become almost full. I've cleared out as much as I can, such as old logs (log.1 etc) One log I've found is my mysql.log file is 4 gigs. Will there be any harm in me deleting this log file?
 

taivu

Well-Known Member
Nov 22, 2001
65
0
306
I don't have that file on CPanel servers, but I do have one on my development system (/var/log/mysql.log). It is a log of MySQL commands (mainly queries) run on the system.

Run &tail mysql.log& to see what it has in it. If it's indeed a log of MySQL commands and you have no use for them, go ahead and delete the file.

If you want to prevent the log from being created in the first place, open &/etc/my.cnf& in your favourite editor and comment out or remove the line: log = /var/log/mysql.log. Restart MySQL for the changes to take effect.
 

Tom Pyles

Well-Known Member
Apr 26, 2002
254
0
316
taivu,
Thanks for the reply...Looking at the file it was mostly from a client running a message board...the client went to a dedicated server this week so I deleted the file. My /var partition went from 96% to roughly 6%