当前库最大包大小M
select CONCAT(@@max_allowed_packet/1024/1024, 'M');
某表的大小M
select concat(round(sum(DATA_LENGTH/1024/1024),2),'M') as '表数据大小',concat(round(sum(INDEX_LENGTH/1024/1024),2),'M') as '表索引大小'
from tables where table_schema='db_name' AND table_name='table_name';