SELECT ROUND(SUM(data_length+index_length)/1024/1024) AS total_mb,ROUND(SUM(data_length)/1024/1024) AS data_mb
,ROUND(SUM(index_length)/1024/1024) AS index_mb
,ROUND(SUM(index_length)/1024/1024) AS index_mb
FROM information_schema.`TABLES`;
将会输出如下(单位:mb):