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;
Martin Lormes on Wordpress, PHP, Nagios, XML, FileMaker, BlackBerry, Arduino
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;
No comments
Comments feed for this article
Trackback link: https://ten-fingers-and-a-brain.com/2020/03/howto-get-the-total-size-of-each-database-in-mysql-mariadb/trackback/