mysql怎么查看数据库中数据的大小

1、查询整个mysql数据库,整个库的大小;e79fa5e98193e78988e69d8331333431376638单位转换为MB。

select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data  from information_schema.TABLES

 

2、查询mysql数据库,某个库的大小;

select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data  from information_schema.TABLES where table_schema = 'crawl'

2、查询mysql数据库,某个库中某个表的大小;

select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data  from information_schema.TABLES where table_schema = 'scrapy' and table_name='test_score'

 

posted @ 2020-05-14 16:22  cknds  阅读(3151)  评论(0编辑  收藏  举报