查看数据库大小

时间:2021-03-15 03:27:24

mysql> use information_schema;
Database changed

mysql> select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data from TABLES
mysql> select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data from TABLES where table_schema='xxxxx'

select concat(round(sum(data_length/1024/1024),2),'MB') as data from tables where table_schema='home' and table_name='members';