web analytics

mySQL: size of the database

SELECT table_schema "Database",  SUM( data_length + index_length ) / 1024 / 1024 "Size (MB)",  SUM( data_free )/ 1024 / 1024 "Free (MB)" FROM information_schema.tables GROUP BY table_schema ;

This will work in mySQL 5.0.2 and newer. Use SHOW TABLE STATUS command for other versions.