SELECT sum(DATA_LENGTH) + sum(INDEX_LENGTH) FROM information_schema.TABLES where TABLE_SCHEMA = '数据库名';//源代码片段来自云代码http://yuncode.net