Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

check database size in gb mysql

# Check Single Database Size in MB

SELECT table_name AS "Table",
ROUND(((data_length + index_length) / 1024 / 1024), 2) AS "Size (MB)"
FROM information_schema.TABLES
WHERE table_schema = "database_name"
ORDER BY (data_length + index_length) DESC;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #database #size #gb #mysql
ADD COMMENT
Topic
Name
3+9 =