您好,欢迎访问一九零五行业门户网

怎样用命令查看Mysql数据库大小_MySQL

bitscn.com
怎样用命令查看mysql数据库大小
1、进去指定schema 数据库(存放了其他的数据库的信息)
1
use information_schema
2、查询所有数据的大小
1
select concat(round(sum(data_length/1024/1024),2),'mb') as data  from tables
3、查看指定数据库的大小
比如说 数据库apoyl
1
select concat(round(sum(data_length/1024/1024),2),'mb') as data  from tables where table_schema='apoyl';
4、查看指定数据库的表的大小
比如说 数据库apoyl 中apoyl_test表
1
select concat(round(sum(data_length/1024/1024),2),'mb') as data  from tables where table_schema='apoyl' and table_name='apoyl_test';
整完了,有兴趣的可以试哈哦!挺使用哈
bitscn.com
其它类似信息

推荐信息