Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 8 of 8
  1. #1
    Member lightbeing's Avatar
    Join Date
    Feb 2010
    Posts
    30

    Default How to set MySQL database max size

    I've set a couple of packages up with some MySQL databases, but can't see how to set the max size of those databases.

    Can anyone point me in the right direction?

  2. #2
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    7,892
    cPanel/Enkompass Access Level

    Root Administrator

    Lightbulb

    The limit is based on the size of the account.
    Fav cPlinks this week: Blog - cPanel & WHM 11.32 we love it! | cPanel University study for it! | Attracta is coming! we want this!

  3. #3
    Member lightbeing's Avatar
    Join Date
    Feb 2010
    Posts
    30

    Default

    Ok, so the DB has the same amount of space as the discspace set for the package, or is it part of that discspace?

  4. #4
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    7,892
    cPanel/Enkompass Access Level

    Root Administrator

    Question

    Quote Originally Posted by lightbeing View Post
    Ok, so the DB has the same amount of space as the discspace set for the package, or is it part of that discspace?
    There is no or there. The disk space for the account is what it is.
    Or am I misunderstandng your question?
    Fav cPlinks this week: Blog - cPanel & WHM 11.32 we love it! | cPanel University study for it! | Attracta is coming! we want this!

  5. #5
    Member
    Join Date
    Jan 2005
    Location
    London, UK
    Posts
    187

    Default

    Sorry to say Infopro, but MySQL databases can go well beyond the account limits for total disk space.

    I had an user account compromised - they stole the password - and the installed phishing files that also logged to a MySQL database, and it grew to over 1GB over less than 3 days before anyone noticed.

    The user account was till below its disk usage limit, but bandwidth went over, hence we were alerted.

    - Vince

  6. #6
    cPanel Product Evangelist Infopro's Avatar
    Join Date
    May 2003
    Location
    Pennsylvania
    Posts
    7,892
    cPanel/Enkompass Access Level

    Root Administrator

    Lightbulb

    Quote Originally Posted by mambovince View Post
    Sorry to say Infopro, but MySQL databases can go well beyond the account limits for total disk space.

    I had an user account compromised - they stole the password - and the installed phishing files that also logged to a MySQL database, and it grew to over 1GB over less than 3 days before anyone noticed.

    The user account was till below its disk usage limit, but bandwidth went over, hence we were alerted.

    - Vince
    Since you've just posted to this other thread on the same topic, I'll let cPanel assist with this.
    http://forums.cpanel.net/f34/when-wi...ql-129409.html

    From the release notes for 11.25 it states this:


    1.7. Database Soft Quotas
    The file used to cache the number of databases owned by an account moved from /home/user/.cpanel/datastore/
    mysql-db-count to /var/cpanel/datastore/user/mysql-db-count. Likewise the PostgreSQL
    cache file is now /var/cpanel/datastore/user/postgres-db-count.
    To keep the cache file current, a cron job executes the following command periodically: /scripts/update_db_cache.
    cPanel™ 11.25 provides support for including the disk space consumed by an account's MySQL and PostgreSQL database
    in the disk usage for the account. To enable this feature toggle the following Tweak Setting:
    When displaying disk usage in cPanel/WHM include Postgresql and MySQL® disk usage.
    As with the database counts, the disk usage calculation is handled by /scripts/update_db_cache which executes every 4
    hours. This script is executed upon enabling the Tweak Setting. Administrators may also execute this script to recalculate
    the figures. The disk usage figures are stored in /var/cpanel/datastore/mysql-disk-usage and /var/
    cpanel/datastore/postgres-disk-usage. The file contents are a colon (:) separated list of user names and
    figures in bytes. See Example 6, “mysql-disk-usage contents”
    This is what I was referring to in my earlier post, not personal experience. Sorry for the confusion.
    Fav cPlinks this week: Blog - cPanel & WHM 11.32 we love it! | cPanel University study for it! | Attracta is coming! we want this!

  7. #7
    Member rs-freddo's Avatar
    Join Date
    May 2003
    Location
    Australia
    Posts
    836
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    It would be madness to limit db space - you would end up with defective data.

    True mysql is now counted in the quota - unfortunately disk space usage does not specify that the missing diskspace is databases. Clients simply have to guess where the additional space they are using is. I expect lots of clients support tickets for this cpanel mistake.
    Michael

  8. #8
    Member
    Join Date
    Jan 2005
    Location
    London, UK
    Posts
    187

    Default

    @Michael,
    Same issue exists with disk space used by MailMan, as you probably know, and I do get emails from customers asking why this info isn't displayed by cPanel.

    - Vince

Similar Threads & Tags
Similar threads

  1. MySQL database size
    By jacobcolton in forum New User Questions
    Replies: 1
    Last Post: 12-16-2009, 06:14 AM
  2. Replies: 23
    Last Post: 06-09-2008, 03:35 PM
  3. how can i set the max of mysql connection number
    By joelin in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 12-13-2007, 08:33 AM
  4. Is it bad to increase the mysql max packet size?
    By BianchiDude in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 11-27-2005, 05:48 PM
  5. mySQL Database size
    By Omar in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 08-22-2002, 11:28 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube