第二种:查询所有数据的大小

select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data from information_schema.TABLES


第三种:查看指定数据库的大小,比如说:数据库apoyl

select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data from information_schema.TABLES where table_schema='apoyl';


第四种:查看指定数据库的表的大小,比如说:数据库apoyl 中apoyl_test表

select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data from information_schema.TABLES where table_schema='apoyl' and table_name='apoyl_test';