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.

mysql database

Discussion in 'General Discussion' started by anish sidhan, Nov 3, 2003.

  1. anish sidhan

    anish sidhan Well-Known Member

    Joined:
    Sep 26, 2003
    Messages:
    45
    Likes Received:
    0
    Trophy Points:
    6
    May i know how big the size of each mySQL i create for my clients> Thankx in advance
     
  2. mickeymouse

    mickeymouse Well-Known Member

    Joined:
    Sep 16, 2003
    Messages:
    389
    Likes Received:
    0
    Trophy Points:
    16
    Dear anish sidhan,

    You can write a query by adding-up table and index sizes to calculate the size of the database, the query is:
    $statustable = mysql_query(\"show table status\") or die(\"Invalid query: \" . mysql_error());
    $status_row = mysql_fetch_array($statustable);
    $tablesize = $status_row[\"Data_length\"];
    $indexsize = $status_row[\"Index_length\"];
    $db_size = $tablesize + $indexsize;

    Regards,
     
  3. anish sidhan

    anish sidhan Well-Known Member

    Joined:
    Sep 26, 2003
    Messages:
    45
    Likes Received:
    0
    Trophy Points:
    6
    Thank you for the help. You are always there to help me. Can I know your real name.?
     
Loading...

Share This Page