SELECT (sum(DATA_LENGTH)+sum(INDEX_LENGTH))/1048576 AS size_M FROM information_schema.TABLES where TABLE_SCHEMA='db_name'