mysql查看数据库所占用的空间
查询某个表所占用的磁盘空间大小:
SELECT CONCAT(ROUND(SUM(data_length/1024/1024),2),'MB') AS data_length_MB,
CONCAT(ROUND(SUM(index_length/1024/1024),2),'MB') AS index_length_MB
FROM `information_schema`.tables WHERE
table_schema='db_name'
AND table_name = 'table_name';