List all MySQL Databases and show their sizes
2009-12-09 by xpheasBASH-Code:
| mysql -u root -p -e 'SELECT table_schema "Database", ROUND(SUM(data_length + index_length)/1024/1024, 4) "Size (MiB)" from information_schema.tables GROUP BY table_schema;' |
BASH-Code:
| +--------------------+------------+ | Database | Size (MiB) | +--------------------+------------+ | information_schema | 0.0039 | | mysql | 0.5040 | | xpheascom | 8.3756 | +--------------------+------------+ |
« back