I've two or more databases in my mysql server. Total memory used by the databases are around 14GB. I want to know, memory used by each database and their tables.
This should work
SELECT table_schema "table name", sum( data_length + index_length ) / 1024 / 1024 "Data Base Size in MB"
FROM information_schema.TABLES GROUP BY table_schema ;
It will display the database sizes in two column format => | database name | database size |
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With