less than 1 minute read

A quick tip on getting the size of all MySQL databases:

SELECT table_schema "Database Name", Round(Sum(data_length + index_length) / 1024 / 1024, 1) "DB Size in MB" FROM information_schema.tables GROUP BY table_schema;

The result

Leave a comment