1.查询指定数据库表的大小
SELECT concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data FROM information_schema.TABLES where TABLE_SCHEMA='你的数据库名称' and table_name = '表名';
2.查询指定数据库中表数量
SELECT COUNT(*) TABLES FROM information_schema.TABLES WHERE table_schema ='你的数据库名称' GROUP BY table_schema;
3.查询指定数据库中表条数
select table_name,table_rows from `information_schema`.`tables` where TABLE_SCHEMA = '你的数据库名称' and TABLE_NAME like '表名'
4.查询数据库数量
SELECT count(DISTINCT(table_schema)) FROM information_schema.TABLES