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