Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 12 of 12
  1. #1
    Member
    Join Date
    Jul 2004
    Posts
    32

    Default mySQL takes up diskquota?

    Hi,

    I have a very simple question, does mySQL databases created by an account uses up the disk quota? Meaning if this user has a quota of 100MB, can his database go above 100MB in total?

  2. #2
    Member
    Join Date
    Jul 2004
    Posts
    32

    Default

    And, I have a DB that has text in it over 58kb.

    When I enter the cpanel, I see my SQL Disk Usage as 0.00.

    Edit: I understand that all the databases are stored in /var/lib/mysql.

    Must I set /var to have userquota in the /etc/fstab?
    Last edited by Necroist; 08-02-2004 at 10:33 AM.

  3. #3
    Member
    Join Date
    Dec 2002
    Posts
    315

    Default

    It is not counted. You have to update it manually.

    Run /scripts/updatemysqlquota

  4. #4
    Member
    Join Date
    Jul 2004
    Posts
    32

    Default

    I did that pior to posting here, unfortunately it didn't help

  5. #5
    Member
    Join Date
    Dec 2002
    Posts
    315

    Default

    Oh, I just read your post again.

    try


    /scripts/fixquotas

    Make sure that in /etc/fstab, your partitions have usrquotas added to /var etc. depending on where's your partitioning. If you don't have a /var partition, you need to enable it for /.

  6. #6
    Member
    Join Date
    Jul 2004
    Posts
    32

    Default

    Ah so I do need to put /var with the userquota flag on in fstab.

    Thanks.

    Am I supposed to reboot or is there some commandline that will refresh the quotas to recongize /var as a quota enabled?

  7. #7
    Member
    Join Date
    Feb 2004
    Posts
    124

    Default

    With disk quotas, I believe every file with a specific owner is counted toward their quota. I also think that mysql has it's files as group 'mysql'

    so for example:
    chown owner_name_here file.name.ext

    will change the owner of a file, that file *i believe* will be now counted toward their quota

  8. #8
    Member
    Join Date
    Jul 2004
    Posts
    32

    Default

    I've did a /var to userquota in etc/fstab,

    restarted the quota thing, did a quota -v, and it now counts /var as a quota enabled path.

    Now, the problem is I did a ./fixqutoas and ./updatemysqlquotas, in my cpanel, I still see my mySQL disk usage as 0.00.

    Did I do anything wrong?

    in my /var/lib/mysql :

    Code:
    drwxrwx---  2 rbox   mysql      1536 Aug  2 21:18 rbox_wpdb
    Shouldn't this mean that that db has been chown-ed to the user rbox and it should count into the quota?

  9. #9
    Member
    Join Date
    Jul 2004
    Posts
    32

    Default

    bumposaurs.

  10. #10
    Member
    Join Date
    Jul 2004
    Posts
    32

    Default

    I'm honestly still getting problems, my SQL Usage just doesn't update itself even though I used like 58kb of mySQL space. It still shows as 0.00

  11. #11
    Member
    Join Date
    Feb 2004
    Posts
    124

    Default

    Hmm...maybe consider that 58k is a low amount and that it might ignore anything under #k?

  12. #12
    Member
    Join Date
    Jul 2004
    Posts
    32

    Default

    Hi,

    you're right, one of my customer uses a database and I was monitoring his mySQL quota status. I checked his cpanel, and there was indeed a value. But here's the bigger problem.

    when I did a du -h on /var/lib/mysql, I realised he is using 2MB for his db, but according to Cpanel, he was only using 0.01MB.

    I did a ./fixquotas and ./updatemysqlquotas and it still shows the same result.

    Is the value that u see under the mySQL disk usage already counted into the Disk Usage?

Similar Threads & Tags
Similar threads

  1. Mysql takes up most of cpu time
    By asiams in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 01-30-2007, 07:29 PM
  2. Problem with diskquota
    By ullalla in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 02-13-2006, 11:58 AM
  3. takes to long
    By Liberty in forum cPanel and WHM Discussions
    Replies: 8
    Last Post: 11-03-2005, 02:23 PM
  4. One domain takes me to another
    By batchtech in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 04-22-2004, 09:23 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube