本文共 342 字,大约阅读时间需要 1 分钟。
可是使用mysql的information_schema数据库,储存的就是数据库元数据相关信息
select sum(DATA_LENGTH) from information_schema.TABLES where table_schema = '你的数据库'
select sum(DATA_LENGTH) from information_schema.TABLES where table_schema = '你的数据库' and table_name = '你的数据表';
转载地址:http://tidfk.baihongyu.com/