by
31 7
2
5
3,676
3
Top 1% !
Famous
Tagged
Specified
OpenSource
Popularity: 3045th place
DBMSMySQL
LanguageMySQL

[MySQL] Calculate Database size

[MySQL] Calculate Database size using simple single query.
Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/1628140/-MySQL--Calculate-Database-size?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
SELECT table_schema "Data Base Name", sum( data_length + index_length ) / 1024 / 1024 "Data Base Size in MB", sum( data_free )/ 1024 / 1024 "Free Space in MB" FROM information_schema.TABLES GROUP BY table_schema ;
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus