The Manual

MySQL DB sizes in GB

SELECT table_schema AS "Database", SUM(data_length + index_length) / 1024 / 1024 / 1024 AS "Size (GB)" FROM information_schema.TABLES GROUP BY table_schema; +--------------------+------------------+ | Database | Size (GB) | +--------------------+------------------+ | db1 | 311.224670410156 | | db2 | 149.395034790039 | +--------------------+------------------+

MySQL Table sizes in a human-readable format

Whats eating my disk space on my MySQL database!

The Manual © 2026