here is a script i made that you can use to get the overall database size, even shows you how much space each table is using, feel free to use it.
PHP Code:
$dbhost = 'localhost';
$dbuser = 'username';
$dbpass = 'password';
$database = 'database';
mysql_connect($dbhost,$dbuser,$dbpass) or die ('unable to connect');
mysql_select_db($database) or die('unable to select database');
$result = mysql_query("show table status");
$total = 0; $table= '';
while($status = mysql_fetch_array($result)) {
$total += ($status['Data_length'] + $status['Index_length']);
$tables .= $status['Name']. ' : ' .number_format(($status['Data_length']/1024), 2). "kb<br />\n";
}
$total = number_format(($total/1024)/1024, 1);
echo $tables ."<br />\n Total size for " . $database .' (<b> '. $total .' MB </b>)';