各データベースでどのくらいの容量があるか知りたい場合のコマンド
Byteで算出する場合
select table_schema, sum(data_length+index_length) as B from information_schema.tables group by table_schema order by sum(data_length+index_length) desc;
MegaByteで算出したい場合は1024で2回割ってやればOK
select table_schema, sum(data_length+index_length) /1024 /1024 as MB from information_schema.tables group by table_schema order by sum(data_length+index_length) desc;
DBの容量でQuotaを掛けたい場合はこの値で計算すれば良いんじゃないかと思うが、そこまで巨大なデータベースを扱う事なんてないだろうなぁwww