1.关于mysql空间使用率的查询:
1.1 查看所有数据库所占磁盘空间大小:
select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data from information_schema.TABLES
1.2 查看数据库中指定库(udb)的大小:
select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data from information_schema.TABLES where table_schema='udb'