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.

/var/lib/mysql question

Discussion in 'General Discussion' started by butch, Feb 22, 2004.

  1. butch

    butch Active Member

    Joined:
    Jun 23, 2003
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    Hello,

    In my /var/lib/mysql directory, there are tons of HOSTNAME-bin.001, 002, 003, etc.

    Each one of these files are around 1GB and I have almost 40 of them. Is it safe to remove these files? If so, what are their purposes?

    Thanks!
     
  2. bamasbest

    bamasbest Well-Known Member

    Joined:
    Jan 10, 2004
    Messages:
    531
    Likes Received:
    0
    Trophy Points:
    16
    These are the MySql binary logfiles. You can easily delete them by logging into mysql via ssh:

    mysql -u root -p

    at the password prompt enter the mysql root password.

    then at the mysql prompt, type:

    RESET MASTER

    mysql>RESET MASTER
     
  3. butch

    butch Active Member

    Joined:
    Jun 23, 2003
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    THanks.

    Now the question is why were they there? And why were each one 1GB big?

    Thanks in advance!
     
  4. bamasbest

    bamasbest Well-Known Member

    Joined:
    Jan 10, 2004
    Messages:
    531
    Likes Received:
    0
    Trophy Points:
    16
    Firstly, don't forget the colon (;) after the mysql command

    mysql> RESET MASTER;

    Secondly, the answer as to why can be found here:
    http://www.mysql.com/doc/en/Binary_log.html
     
  5. butch

    butch Active Member

    Joined:
    Jun 23, 2003
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    Thanks for the info!
     
Loading...

Share This Page