Skip to content

Instantly share code, notes, and snippets.

@winminsoe
Last active July 7, 2020 04:24
Show Gist options
  • Select an option

  • Save winminsoe/59578aee0ec8490c7c153fa6d41f2229 to your computer and use it in GitHub Desktop.

Select an option

Save winminsoe/59578aee0ec8490c7c153fa6d41f2229 to your computer and use it in GitHub Desktop.
MySQL DB size
SELECT table_name AS `Table`, round(((data_length + index_length) / 1024 / 1024), 2) `Size (MB)` 
FROM information_schema.TABLES 
WHERE table_schema = "$your_database";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment