1.查看数据库大小
select round(sum(DATA_LENGTH/1024/1024),2) MB from information_schema.tables;
2.查看某个表大小
select round(sum(DATA_LENGTH/1024/1024), 2) MB from information_schema.tables where TABLE_SCHEMA = '数据库名' and TABLE_NAME = '数据表名';
3.查看数据库各个表的大小
select round(DATA_LENGTH/1024/1024, 2) MB from information_schema.tables where TABLE_SCHEMA = '数据库名';