导航

统计MySQL数据库大小

Posted on 2013-01-25 17:04  eastson  阅读(305)  评论(0编辑  收藏  举报

一条简单的语句就可以:

SELECT table_schema AS "DBName", sum( data_length + index_length ) AS "DBSize(Bytes)"
FROM information_schema.TABLES GROUP BY table_schema