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.

Any idea what is cuasing all these bin files in /var/lib/mysql ?

Discussion in 'General Discussion' started by Vatoloco, Mar 3, 2005.

  1. Vatoloco

    Vatoloco Well-Known Member

    Joined:
    Jun 21, 2004
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    Within the last month I started to notice my free disk space shrinking very quickly. It finally hit 50% and I decided to finally track down where it was being used. As you can see below mysql is for some reason dumping 1 gigabyte files every few days:

    Code:
    root@kirsten [/var/lib/mysql]# ls -lah
    total 21G
    drwxr-x--x    9 mysql    root         4.0K Mar  1 17:26 ./
    drwxr-xr-x   18 root     root         4.0K Oct 22 04:24 ../
    -rw-rw----    1 mysql    root         4.0K Jun 21  2004 cpanel.ev1servers.net.err
    drwx------    2 mysql    mysql        4.0K Dec  9 17:03 eximstats/
    drwx------    2 mysql    mysql        4.0K Jan 13 18:56 horde/
    -rw-rw----    1 mysql    mysql         24K Jan 19  2004 ib_arch_log_0000000000
    -rw-rw----    1 mysql    mysql         10M Dec  9 17:20 ibdata1
    -rw-rw----    1 mysql    mysql        5.0M Dec  9 17:20 ib_logfile0
    -rw-rw----    1 mysql    mysql        5.0M Jan 19  2004 ib_logfile1
    drwx------    2 mysql    mysql        8.0K Feb 28 02:33 mywebsite_ipb/
    drwx------    2 mysql    mysql        4.0K Dec 22 20:07 mywebsite_ryan/
    drwxrwx---    2 mysql    mail         4.0K Jan 19  2004 mail/
    drwx--x--x    2 mysql    root         4.0K Dec  9 17:03 mysql/
    srwxrwxrwx    1 mysql    mysql           0 Jan 28 18:13 mysql.sock=
    -rw-rw----    1 mysql    mysql        166M Dec 10 22:44 kirsten-bin.001
    -rw-rw----    1 mysql    mysql          79 Dec 10 22:44 kirsten-bin.002
    -rw-rw----    1 mysql    mysql        5.6M Dec 10 23:54 kirsten-bin.003
    -rw-rw----    1 mysql    mysql        767M Dec 16 20:05 kirsten-bin.004
    -rw-rw----    1 mysql    mysql        141M Dec 17 21:02 kirsten-bin.005
    -rw-rw----    1 mysql    mysql        494M Dec 22 06:21 kirsten-bin.006
    -rw-rw----    1 mysql    mysql         38M Dec 22 12:14 kirsten-bin.007
    -rw-rw----    1 mysql    mysql        254M Dec 24 04:40 kirsten-bin.008
    -rw-rw----    1 mysql    mysql        1.9K Dec 24 04:42 kirsten-bin.009
    -rw-rw----    1 mysql    mysql        315M Dec 27 12:21 kirsten-bin.010
    -rw-rw----    1 mysql    mysql        2.7K Dec 27 12:21 kirsten-bin.011
    -rw-rw----    1 mysql    mysql        8.5M Dec 27 14:06 kirsten-bin.012
    -rw-rw----    1 mysql    mysql          79 Dec 27 14:06 kirsten-bin.013
    -rw-rw----    1 mysql    mysql          79 Dec 27 14:07 kirsten-bin.014
    -rw-rw----    1 mysql    mysql         37M Dec 27 19:35 kirsten-bin.015
    -rw-rw----    1 mysql    mysql        409M Dec 30 17:59 kirsten-bin.016
    -rw-rw----    1 mysql    mysql        300M Jan  2 20:54 kirsten-bin.017
    -rw-rw----    1 mysql    mysql        780M Jan  8 16:28 kirsten-bin.018
    -rw-rw----    1 mysql    mysql        232M Jan 10 16:45 kirsten-bin.019
    -rw-rw----    1 mysql    mysql         39M Jan 10 21:17 kirsten-bin.020
    -rw-rw----    1 mysql    mysql         15K Jan 10 21:19 kirsten-bin.021
    -rw-rw----    1 mysql    mysql        107M Jan 11 16:34 kirsten-bin.022
    -rw-rw----    1 mysql    mysql          79 Jan 11 16:35 kirsten-bin.023
    -rw-rw----    1 mysql    mysql          79 Jan 11 16:36 kirsten-bin.024
    -rw-rw----    1 mysql    mysql         74M Jan 11 23:26 kirsten-bin.025
    -rw-rw----    1 mysql    mysql        135M Jan 12 14:04 kirsten-bin.026
    -rw-rw----    1 mysql    mysql          79 Jan 12 14:04 kirsten-bin.027
    -rw-rw----    1 mysql    mysql         91M Jan 12 19:15 kirsten-bin.028
    -rw-rw----    1 mysql    mysql        631M Jan 14 21:40 kirsten-bin.029
    -rw-rw----    1 mysql    mysql        316M Jan 16 11:10 kirsten-bin.030
    -rw-rw----    1 mysql    mysql        487M Jan 17 22:10 kirsten-bin.031
    -rw-rw----    1 mysql    mysql        3.5K Jan 17 22:12 kirsten-bin.032
    -rw-rw----    1 mysql    mysql        173K Jan 17 22:12 kirsten-bin.033
    -rw-rw----    1 mysql    mysql        1.0G Jan 20 22:06 kirsten-bin.034
    -rw-rw----    1 mysql    mysql        1.0G Jan 24 15:05 kirsten-bin.035
    -rw-rw----    1 mysql    mysql        3.3M Jan 24 15:19 kirsten-bin.036
    -rw-rw----    1 mysql    mysql        155M Jan 25 12:52 kirsten-bin.037
    -rw-rw----    1 mysql    mysql        207M Jan 25 23:15 kirsten-bin.038
    -rw-rw----    1 mysql    mysql         960 Jan 25 23:26 kirsten-bin.039
    -rw-rw----    1 mysql    mysql          79 Jan 25 23:26 kirsten-bin.040
    -rw-rw----    1 mysql    mysql          79 Jan 25 23:28 kirsten-bin.041
    -rw-rw----    1 mysql    mysql          79 Jan 25 23:28 kirsten-bin.042
    -rw-rw----    1 mysql    mysql        1.4M Jan 25 23:57 kirsten-bin.043
    -rw-rw----    1 mysql    mysql        912M Jan 28 17:04 kirsten-bin.044
    -rw-rw----    1 mysql    mysql        1.0G Jan 31 22:02 kirsten-bin.045
    -rw-rw----    1 mysql    mysql        1.0G Feb  3 17:54 kirsten-bin.046
    -rw-rw----    1 mysql    mysql        1.0G Feb  7 08:46 kirsten-bin.047
    -rw-rw----    1 mysql    mysql        1.0G Feb  9 21:14 kirsten-bin.048
    -rw-rw----    1 mysql    mysql        1.0G Feb 12 20:43 kirsten-bin.049
    -rw-rw----    1 mysql    mysql        1.0G Feb 15 19:07 kirsten-bin.050
    -rw-rw----    1 mysql    mysql        1.0G Feb 18 13:06 kirsten-bin.051
    -rw-rw----    1 mysql    mysql        1.0G Feb 21 14:29 kirsten-bin.052
    -rw-rw----    1 mysql    mysql        1.0G Feb 24 00:40 kirsten-bin.053
    -rw-rw----    1 mysql    mysql        1.0G Feb 26 23:50 kirsten-bin.054
    -rw-rw----    1 mysql    mysql        1.0G Mar  1 17:26 kirsten-bin.055
    -rw-rw----    1 mysql    mysql        584M Mar  3 02:02 kirsten-bin.056
    -rw-rw----    1 mysql    mysql         784 Mar  1 17:26 kirsten-bin.index
    -rw-rw----    1 mysql    root         6.7K Dec  9 17:20 kirsten.mywebsite.com.err
    -rw-rw----    1 mysql    mysql           5 Jan 28 18:13 kirsten.mywebsite.com.pid
    drwxr-xr-x    2 mysql    root         4.0K Jan 19  2004 test/
    Any idea what is causing this and how I can fix it?
     
  2. Vatoloco

    Vatoloco Well-Known Member

    Joined:
    Jun 21, 2004
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    Well, I did some searching on another forum and it is something to do with logging.

    There is a line in /etc/my.cnf :

    log-bin

    I removed that and it is supposed to stop it. There was also a line below it "server-id=1" that I think was related but I wasn't sure if it could be safely removed or not, so I left it. I guess if it keeps making these huge files, I'll know! :)
     
  3. royhobbs

    royhobbs Member

    Joined:
    Apr 30, 2003
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Utah
    I'm having the same problem, I was wondering if you could post some more information about what you discovered. I realize this is probably a logging thing, but rather than just stop logging, or deleting the files, how can we better manage this?

    For example, allow it to only create a certain number of log files before it starts over?

    Thanks.
     
  4. Vatoloco

    Vatoloco Well-Known Member

    Joined:
    Jun 21, 2004
    Messages:
    100
    Likes Received:
    0
    Trophy Points:
    16
    I'm not sure how you would set it up to rotate the logs instead of just disabling them like I did. If anyone has that information, I would be interested in how it's done.
     
Loading...

Share This Page