Skip to content

Instantly share code, notes, and snippets.

@peshkira
Created December 5, 2011 10:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save peshkira/1433182 to your computer and use it in GitHub Desktop.
Save peshkira/1433182 to your computer and use it in GitHub Desktop.
MySQL DB Size
SELECT
CONCAT(sum(ROUND(((DATA_LENGTH + INDEX_LENGTH - DATA_FREE) / 1024 / 1024),2))," MB") AS Size FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA = 'YOUR_DATABASE_NAME' ;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment