MySQL: Which table is eating my Disk Space?!!!

If you are using mysql with innodb engine without files per table, and want to know which table is eating your disk space… here is the the way I have checked today:

mysql> SELECT CONCAT(table_schema, '.', table_name), 
         CONCAT(ROUND(table_rows / 1000000, 2), 'M') rows, 
         CONCAT(ROUND(data_length / ( 1024 * 1024 * 1024 ), 2), 'G') DATA, 
         CONCAT(ROUND(index_length / ( 1024 * 1024 * 1024 ), 2), 'G') idx, 
         CONCAT(ROUND(( data_length + index_length ) / ( 1024 * 1024 * 1024 ), 2), 'G') total_size, 
         ROUND(index_length / data_length, 2) idxfrac 
FROM information_schema.TABLES 
         ORDER BY data_length + index_length 
         DESC 
         LIMIT 30;

Also if you want to find Size of each Database the:

mysql> select table_schema,
 concat(round(sum(data_length+index_length)/(1024*1024*1024),2),'G') SIZE 
FROM TABLES 
 GROUP BY table_schema 
 ORDER BY sum(data_length+index_length) 
 desc;

:)