Created
October 1, 2014 17:14
-
-
Save fduran/d99d3777036970dbbaf1 to your computer and use it in GitHub Desktop.
Calculate MySQL schema disk size
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# calculate mysql schemas disk size | |
mysql -h dbhost.example.com -u theuser -pThePassword -e 'select table_schema as DB, round(sum((data_length+index_length)/1024/1024),1) as MB from information_schema.tables group by table_schema order by MB desc' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment