9951 explained code solutions for 126 technologies


mysqlGet total size of specific databse


SELECT ROUND(SUM(data_length + index_length) / 1024 / 1024, 1) FROM information_schema.tables WHERE table_schema = 'db';ctrl + c
ROUND(SUM(data_length + index_length) / 1024 / 1024, 1)

will return final size in Megabytes

information_schema.tables

system table with meta data for all tables on server

table_schema = 'db'

we get total size for db database