March 1, 2017 · MySQL Quick Tip

MySQL- Get Database size

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

  • LinkedIn
  • Tumblr
  • Reddit
  • Google+
  • Pinterest
  • Pocket
Comments powered by Disqus