RussianPenguin
9/28/2018 - 8:11 PM

MySQL database size

Obtain MySQL database size

SELECT
  table_schema AS "Database", 
  ROUND(SUM(data_length + index_length) / 1024 / 1024, 2) AS "Size (MB)" 
FROM 
  information_schema.TABLES 
GROUP BY 
  table_schema;