计算Mysql数据库空间占用

作者:linux120 发布时间:November 27, 2012 分类:服务器配置

检查数据库占用
SELECT table_schema "Database Name", sum( data_length + index_length) / 1024 / 1024
"Database Size(MB)" FROM information_schema.TABLES GROUP BY table_schema ;

检查库表空间占用
SELECT table_name, table_rows, data_length, index_length, round(((data_length + index_length) / 1024 / 1024),2) "Size(MB)" FROM information_schema.TABLES WHERE table_schema = "movies";

标签: none

评论已关闭