Size of mysql database – howto

How to get size of a mysql database?

Login as root and check the next query:

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

Bonus:

Listing stored procedures

SHOW PROCEDURE STATUS;

Listing all triggers

SELECT trigger_schema, trigger_name, action_statement FROM information_schema.triggers;

Leave a Reply

Your email address will not be published. Required fields are marked *