Skip to content

Instantly share code, notes, and snippets.

@hotsaucejake
Last active February 7, 2019 17:41
Show Gist options
  • Save hotsaucejake/0591e07cadf2446f15e5ed0723b031b2 to your computer and use it in GitHub Desktop.
Save hotsaucejake/0591e07cadf2446f15e5ed0723b031b2 to your computer and use it in GitHub Desktop.
Size of mysql database
SELECT table_schema "DB Name",
        ROUND(SUM(data_length + index_length) / 1024 / 1024, 1) "DB Size in MB" 
FROM information_schema.tables 
GROUP BY table_schema; 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment