select
table_schema as "database name",
sum(data_length + index_length) / 1024 / 1024 as "size(MB)",
sum(data_free) / 1024 / 1024 as "free(MB)"
from
information_schema.TABLES
group by
table_schema;select
table_schema as "database name",
table_name as "table name",
sum(data_length + index_length) / 1024 / 1024 as size,
sum(data_free) / 1024 / 1024 as "free(MB)"
from
information_schema.TABLES
group by
table_name
order by
size desc;show table status;
select * from information_schema.TABLES;
