The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

MySQL.log

Discussion in 'General Discussion' started by Tom Pyles, Feb 4, 2003.

  1. Tom Pyles

    Tom Pyles Well-Known Member

    Joined:
    Apr 26, 2002
    Messages:
    254
    Likes Received:
    0
    Trophy Points:
    16
    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?
     
  2. taivu

    taivu Well-Known Member

    Joined:
    Nov 22, 2001
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    6
    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.
     
  3. Tom Pyles

    Tom Pyles Well-Known Member

    Joined:
    Apr 26, 2002
    Messages:
    254
    Likes Received:
    0
    Trophy Points:
    16
    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%
     
Loading...

Share This Page