Skip to content

Instantly share code, notes, and snippets.

@lizconlan
Created February 11, 2010 11:36
Show Gist options
  • Save lizconlan/301440 to your computer and use it in GitHub Desktop.
Save lizconlan/301440 to your computer and use it in GitHub Desktop.
Getting database sizes from MySQL
SELECT table_schema "Database Name", sum( data_length + index_length ) / 1024 / 1024 "Database 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