Mysql contains size of all tables in information_schema.TABLES table. The following query can be used to get size of all databases on a mysql server:
SELECT table_schema "DBName", sum( data_length + index_length ) / 1024 / 1024 "DBSize-MB" FROM information_schema.TABLES GROUP BY table_schemaHere is the sample outcome