Quick Tip: Calculate MySQL DBs disk space usage

There may be situations when you need to calculate MySQL DB disk space usage. Maybe you want to move your server to new one or just utilizing too much HDD space because of something.
This SQL command will show you total HDD space occupied in MB:

If you want to see space occupied by every single database you can use the following SQL query. This will sort databases by disk usage.

Leave a Reply

Your email address will not be published. Required fields are marked *

WP-SpamFree by Pole Position Marketing

Share This