MYSQL – command line determine database size

1. Log in to your account using SSH.

2. mysql -u username -p

3.

SELECT table_schema "Data Base Name",
sum( data_length + index_length ) / 1024 /
1024 "Data Base Size in MB",
sum( data_free )/ 1024 / 1024 "Free Space in MB"
FROM information_schema.TABLES
GROUP BY table_schema ;

Leave a Comment

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

Scroll to Top