MySQL查看数据库大小sql命令
1、进入information_schema 数据库(存放了其他的数据库的信息)
use information_schema;
2、查询所有数据的大小:
select concat(round(sum(data_length/1024/1024),2),’MB’) as data from tables;
3、查看指定数据库的大小:
比如查看数据库home的大小
select concat(round(sum(data_length/1024/1024),2),’MB’) as data from tables where table_schema=’home’;
4、查看指定数据库的某个表的大小
比如查看数据库home中 members 表的大小
select concat(round(sum(data_length/1024/1024),2),’MB’) as data from tables where table_schema=’home’ and table_name=’members’;
您可能感兴趣的文章:
MySQL查看数据库大小sql命令
用sql命令查看Mysql数据库及表大小的方法介绍
MySQL导入导出命令的例子
phpmyadmin导入大于2M的SQL文件
linux控制台导入mysql数据库的方法
mysql慢查询开启与配置
mysql导出数据库多种方法
MySQL常见错误代码解析
mysql导入sql文件 mysql远程登录
mysql自动增量备份数据库的例子