MySQL: Determine the Size of Each Database on a Server

2/15/2021 8:06:23 PM

select * from 
(
	SELECT 		table_schema,
				ROUND(SUM(data_length + index_length) / 1024 / 1024, 1)  as SizeInMb
                
	FROM 		information_schema.tables 
    
	GROUP BY 	table_schema
) as tables

order by SizeInMb desc