use information_schema;
select concat(round(sum(DATA_LENGTH/1024/1024), 2), 'MB') as data from TABLES;
select concat(round(sum(DATA_LENGTH/1024/1024), 2), 'MB') as data from TABLES where table_schema='dbname';
select table_schema,table_name,table_rows,data_length/1024/1024 from TABLES where table_schema='dbname'
記錄