mysql查看数据库大小
① mysql 怎么知道 数据库大小。在phpmyadmin中,新建了一个数据库。然后建了很多表与数据。怎么知其大小
在phpmyadmin中点击数据库,在显示表的下方有统计容量大小的数据。
例如:
columns_priv 0 MyISAM utf8_bin 1.0 KB -
db 1 MyISAM utf8_bin 4.9 KB 438 字节
func 0 MyISAM utf8_bin 1.0 KB -
help_category 36 MyISAM utf8_general_ci 23.4 KB -
help_keyword 378 MyISAM utf8_general_ci 87.7 KB -
help_relation 724 MyISAM utf8_general_ci 18.4 KB -
help_topic 458 MyISAM utf8_general_ci 258.4 KB -
host 0 MyISAM utf8_bin 1.0 KB -
proc 0 MyISAM utf8_general_ci 1.0 KB -
procs_priv 0 MyISAM utf8_bin 1.0 KB -
tables_priv 0 MyISAM utf8_bin 1.0 KB -
time_zone 0 MyISAM utf8_general_ci 1.0 KB -
time_zone_leap_second 0 MyISAM utf8_general_ci 1.0 KB -
time_zone_name 0 MyISAM utf8_general_ci 1.0 KB -
time_zone_transition 0 MyISAM utf8_general_ci 1.0 KB -
time_zone_transition_type 0 MyISAM utf8_general_ci 1.0 KB -
user 2 MyISAM utf8_bin 2.2 KB -
17 个表 总计 1,599 MyISAM gb2312_chinese_ci 406.0 KB 438 字节
② mysql怎么查看数据库中表的大小
1、查询整个mysql数据库,整个库的大小;单位转换为MB。
select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data from information_schema.TABLES