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.

add MySQL Disk Space in user quota space

Discussion in 'E-mail Discussions' started by activa, Feb 28, 2007.

  1. activa

    activa Well-Known Member

    Joined:
    May 23, 2006
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Morocco
    cPanel Access Level:
    Root Administrator
    hello all

    i want to make the MySQL Disk Space part of the user quota , for example if the disk space used is 100 mb and the mysql disk space is 200 mb and the package assigned to the use is 250 mb , it must show a over quota of this user .

    to vote for this feature please go to

    http://bugzilla.cpanel.net/show_bug.cgi?id=6119

    thanks in advance
     
    #1 activa, Feb 28, 2007
    Last edited: Nov 24, 2007
  2. SoftDux

    SoftDux Well-Known Member

    Joined:
    May 27, 2006
    Messages:
    983
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Johannesburg, South Africa
    cPanel Access Level:
    Root Administrator
    It should be doing that by default, MySQL & Email space is part of the account
     
  3. LoNgLY

    LoNgLY Registered

    Joined:
    Mar 9, 2007
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Yes. My friend its defaults cpanel.
     
  4. yapluka

    yapluka Well-Known Member

    Joined:
    Dec 24, 2003
    Messages:
    301
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    France
    cPanel Access Level:
    Root Administrator
    Actually, it is not. Emails are part of the account but mysql is not. Mysql files are not owned by the user but by mysql...

    Just an example :

    Disk usage 103.02 / 500.00 MB
    MySQL Disk usage 495.50 MB
    Disk space available 396.98 MB
     
    #4 yapluka, Mar 10, 2007
    Last edited: Mar 10, 2007
  5. activa

    activa Well-Known Member

    Joined:
    May 23, 2006
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Morocco
    cPanel Access Level:
    Root Administrator
    you're right .

    how to get the mysql espace part of the user acccount ?
     
  6. yapluka

    yapluka Well-Known Member

    Joined:
    Dec 24, 2003
    Messages:
    301
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    France
    cPanel Access Level:
    Root Administrator
    The problem is that the mysql files are not owned by the username. There is not much that we can do from our side and your best option would be to contact directly cPanel support and/or add it to bugzilla.cpanel.net.

    This would be a nice improvement :)
     
  7. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,460
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    MySQL itself does not support filesystem quotas. There are various ways to coax (read: force) the system to use filesystem quotas with MySQL databases, but none work very well, and there are trivial ways to bypass the quotas with a default MySQL configuration.
     
  8. yapluka

    yapluka Well-Known Member

    Joined:
    Dec 24, 2003
    Messages:
    301
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    France
    cPanel Access Level:
    Root Administrator
    So what ? Does this mean that the mysql space will never count under the user quota, even with cPanel 11 ?
     
  9. yapluka

    yapluka Well-Known Member

    Joined:
    Dec 24, 2003
    Messages:
    301
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    France
    cPanel Access Level:
    Root Administrator
    That's cool news ! Thank you Kenneth ! :)
     
  10. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,460
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    NO. They will count toward quota
     
  11. jaizkris

    jaizkris Member

    Joined:
    Mar 4, 2007
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Hello friends,

    The space used by mysql of an account will come under the quta of that account.

    But we cant fix a particular quta to mysql.

    The cpanel setting is llike that . mysql can use any amount of space available from an account.
     
  12. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Well, you can use /scripts/updatemysqlquota which will then charge the space to the quota as it simply chowns the mysql table files. However, there are some major problems in doing this:

    1. If any cPanel accounts runs out of quota, MySQL will break

    2. You have to run the script on a regular basis as it will need to chown newly created MySQL databases/tables
     
    Metro2 likes this.
  13. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,460
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    I think he means having a separate quota for databases, much as there are for email accounts. This *might* be possible with some of the methods we're investigating for database quota enforcement.
     
  14. activa

    activa Well-Known Member

    Joined:
    May 23, 2006
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Morocco
    cPanel Access Level:
    Root Administrator
    yes, that is the idea .

    account espace = email quota + mysql quota + espace quota .

    exaple 1 :

    account espace : 500 mg ;
    email quota : 10 mg ;
    mysql quota : 120 mg ;

    Disk space available = (500 -10 - 120) = 370 mg .

    exaple 2 :

    account espace : 500 mg ;
    email quota : 10 mg ;
    mysql quota : 520 mg ;

    Disk space available = (500 -10 - 520) = -30 mg . (quota exceced ).
     
  15. redham

    redham Member

    Joined:
    Aug 14, 2006
    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    1
    Why would you want to divide the quota up like that anyway? /just curious.
     
  16. rejected

    rejected Well-Known Member

    Joined:
    Sep 19, 2006
    Messages:
    48
    Likes Received:
    0
    Trophy Points:
    0
    Maybe PHP it? :)

    <?php
    $mysql = '<cpanel Mysql="diskusage()">';
    $disk = '<cpanel Quota="showquotaused()">';
    echo $mysql + $disk;
    ?>

    Right now we have 2 separate quotas one for Mail and One for web eg. User gets 50mb web space and 200mb email space the modules aren't that hard to build :)
     
    #16 rejected, Apr 3, 2007
    Last edited: Apr 3, 2007
  17. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    That's not how it would work, IIU cpanelkenneth correctly. You would have a separate quota for MySQL database (that is, separate from the disk quota). The email quota is already included in the disk quota (it's a subset of it, if you like), and the MySQL quota would not be charged to the disk quota but would be a separate quota on the account.
     
  18. activa

    activa Well-Known Member

    Joined:
    May 23, 2006
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Morocco
    cPanel Access Level:
    Root Administrator
    this is possible in cpanel what i have mentioned

    account espace = email quota + mysql quota + espace quota


    and how ?
     
  19. activa

    activa Well-Known Member

    Joined:
    May 23, 2006
    Messages:
    204
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Morocco
    cPanel Access Level:
    Root Administrator
    this fontcion must be integrated in cpanel , beacause some account has per example 100 mb qouta , but they use 10 mb espace and 1500 mb in mysql database . that is not logical ; if we have limited the account in 100 mb it must be show that user has been execed the quta of this account .
     
  20. EWD

    EWD Well-Known Member
    PartnerNOC

    Joined:
    Aug 19, 2003
    Messages:
    165
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    NY
    I agree, this should have been fixed long ago.

    CPanel DOES show the amount of disk space used by files/e-mails.
    CPanel DOES show the amount of disk space used by mysql.

    Why can't cpanel add the 2 up(as examples shown previously in this thread) and display the correct available space?

    It is a matter of a + b =c
    If c > x then account ok
    If c < x then account is not ok


    I figured something like this would be cake for the cpanel devs to integrate, No?
     
Loading...

Share This Page