use information_schema;
select concat(round(sum(data_length/1024/1024),2),’MB’) as data from tables where TABLE_SCHEMA=’数据库名’;
得到的结果是以字节为单位,除1024为K,除1048576为M。
转载请注明:IT起义 » linux mysql查看数据库大小
use information_schema;
select concat(round(sum(data_length/1024/1024),2),’MB’) as data from tables where TABLE_SCHEMA=’数据库名’;
得到的结果是以字节为单位,除1024为K,除1048576为M。
转载请注明:IT起义 » linux mysql查看数据库大小