Skip to content

Instantly share code, notes, and snippets.

@belsrc
Last active January 12, 2016 15:14
Show Gist options
  • Save belsrc/f2720041fc251786afef to your computer and use it in GitHub Desktop.
Save belsrc/f2720041fc251786afef to your computer and use it in GitHub Desktop.
Database Size
SELECT table_schema AS 'Database name',
SUM(data_length + index_length) / 1024 / 1024 AS 'Size (MB)',
SUM(data_free) / 1024 / 1024 AS 'Free (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