Get the real size of your MySQL database
mysql> 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;
+--------------------+----------------------+------------------+
| Data Base Name | Data Base Size in MB | Free Space in MB |
+--------------------+----------------------+------------------+
| information_schema | 0.00878906 | 0.00000000 |
| mysql | 6.43213463 | 355.00080490 |
| performance_schema | 0.00000000 | 0.00000000 |
+--------------------+----------------------+------------------+
Written by Scott Grogan
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Mysql
Authors
Related Tags
#mysql
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#