mysql 查看数据库大小

use information_schema;
查看所有
select concat(round(sum(data_length/1024/1024),2),'MB') as data from tables;
查看指定数据库
select concat(round(sum(data_length/1024/1024),2),'MB') as data from tables where table_schema='hivedb';
查看指定表
select concat(round(sum(data_length/1024/1024),2),'MB') as data from tables where table_schema='busdata' and table_name='syslog';

 

posted @ 2019-03-01 18:23  我是属车的  阅读(412)  评论(0编辑  收藏  举报