查询DB容量
SELECT table_schema "Data Base Name", sum(data_length + index_length) / (1024 * 1024) "Data Base Size in MB"
FROM information_schema.TABLES
GROUP BY table_schema;
查询Table容量
SELECT TABLE_NAME, round(((data_length + index_length) / (1024 * 1024)), 2) as "size in megs"
FROM information_schema.tables
WHERE table_schema = "{your_database}";