每个mysql都有一个库information_schema,里面有一张表TABLES存储了所有数据库表的信息,因此,可以从这张表中查看数据库大小和表大小 查询数据库大小 ,),'GB') as data from information_schema.tables where table_schema='esb'; 查询数据库中表大小 ,),'GB') as data from information_schema.tables where table_schema='esb' and tab
查看数据库表基本信息. select * from information_schema.TABLES where information_schema.TABLES.TABLE_SCHEMA = '数据库名' and information_schema.TABLES.TABLE_NAME = '表名'; 查看mysql数据库大小 SELECT sum(DATA_LENGTH)+sum(INDEX_LENGTH) FROM information_schema.TABLES where TAB
SQL命令查看Mysql数据库大小的方法. 要想知道每个数据库的大小的话,步骤如下: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
网上查了很多资料,最后发现一个可行的,分享如下: 数据库大小查询: select concat(round(sum(DATA_LENGTH/1024/1024),2),'M') from information_schema.TABLES where TABLE_SCHEMA='数据库名称'; 表大小查询:SELECT concat(round(sum(DATA_LENGTH/1024/1024),2),'M') FROM information_schema.TABLES where TABL
要想知道每个数据库的大小的话,步骤如下: 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
数据库版本为5.7以上1.选择数据库use mydb1; 2.查看指定数据库表结构select * from information_schema.TABLES where information_schema.TABLES.TABLE_SCHEMA='mydb1'; 3.查看指定数据库的大小 比如说 数据库mydb1select concat(round(sum(DATA_LENGTH/1024/1024),2), 'MB') as data from information_schema.T
mysql> mysql> use information_schema ; /*切换到information_schema数据下*/ Database changed mysql> mysql),),'MB') as data from tables; /*查询所有数据大小*/ +----------+ | data | +----------+ .68MB | +----------+ row in set (0.36 sec) mysql),),'MB') as data from