Current time: 06-18-2024, 11:37 PM Hello There, Guest! (LoginRegister)


Post Reply 
[SOLVED] MySQL on external server - no quota?
Author Message
zmediaguru Offline
Junior Member
*

Posts: 16
Joined: Jan 2007
Reputation: 0
Post: #6
RE: MySQL on external server - no quota?
(10-07-2008 05:51 PM)FeG Wrote:  This is already implemented in the ispCP engine if I'm right. You have to change in /var/www/ispcp/engine/quota/ispcp-dsk-quota the line 370:

Code:
$rs = mysqldb_quota_by_dir_engine();

to

Code:
$rs = mysqldb_quota_by_mysql_engine();

By doing so you switch from retrieving the space used by mysql-dbs from the 'du'-procedure to a method depending only on mysql queries.

Perfect! This is exactly what I was looking for. One quick note - the table status Data_length and Index_length values used by this functions appear to be returning data size in bits, and need to be converted to MB in /var/www/ispcp/engine/quota/ispcp-dsk-quota the line 200:

Code:
$size += $data_length + $index_length;

to

Code:
$size += ($data_length / 1073741824) + ($index_length / 1073741824);

# 1073741824 = 1024 * 1024 * 1024 - convert bits to MB

Otherwise disk quota counts are WAY too high.
Note: I attempted to post a reply to this effect on the Ticket, but was rejected as 'possible spam'.
(This post was last modified: 10-08-2008 06:49 AM by zmediaguru.)
10-08-2008 06:47 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Messages In This Thread
RE: MySQL on external server - no quota? - zmediaguru - 10-08-2008 06:47 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)