SELECT table_schema AS “DB_NAME”, SUM(data_length + index_length) / 1024 / 1024 AS “Size (MB)” FROM information_schema.TABLES GROUP BY table_schema;
mysql select database size
Leave a reply
SELECT table_schema AS “DB_NAME”, SUM(data_length + index_length) / 1024 / 1024 AS “Size (MB)” FROM information_schema.TABLES GROUP BY table_schema;