查看MYSQL中所有DB的大小
访问量: 4446
select table_schema 'db_name' , sum(data_length) /1024/1024 'size(mb)' from information_schema.tables group by table_schema;
mysql> select table_schema 'stat' , sum(data_length) /1024/1024 'data(mb)', sum(index_length)/1024/1024 'index(mb)' from information_schema.tables group by table_schema; +--------------------+-----------------+-----------------+ | stat | data(mb) | index(mb) | +--------------------+-----------------+-----------------+ | gu??_tmp | 81.62409210 | 0.45410156 | | hive_tmp | 0.27797318 | 0.07910156 | | hi??_wireless | 62.82812500 | 31.01562500 | | information_schema | 0.00000000 | 0.00878906 | | mobile_production | 0.52366257 | 0.45312500 | | mysql | 0.54868793 | 0.10058594 | | performance_schema | 0.00000000 | 0.00000000 | | scheduler | 8.54602623 | 4.39355469 | | slow_query_log | 18.12500000 | 5.03125000 | | sta? | 300910.57133389 | 185895.51367188 | | sta?_cms | 1.32024574 | 0.11425781 | | sta?_freewap | 27.45990467 | 8.10742188 | | stat_wap_pv | 0.00343323 | 0.00195313 | | test | 0.00012589 | 0.01269531 | +--------------------+-----------------+-----------------+