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