1个回答
展开全部
mysql> show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| hnmcc |
| hnmcc_ecp |
| hnmcc_push |
| hnmcc_sso |
| mysql |
| percona |
| performance_schema |
| test |
+--------------------+
9 rows in set (0.00 sec)
// 使用mysql自带管理表information_schema.
mysql> use information_schema;
mysql> select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data from TABLES where table_schema='hnmcc' and table_name='l_log_20160102';
+-----------+
| data |
+-----------+
| 4803.00MB |
+-----------+
1 row in set (0.00 sec)
+--------------------+
| Database |
+--------------------+
| information_schema |
| hnmcc |
| hnmcc_ecp |
| hnmcc_push |
| hnmcc_sso |
| mysql |
| percona |
| performance_schema |
| test |
+--------------------+
9 rows in set (0.00 sec)
// 使用mysql自带管理表information_schema.
mysql> use information_schema;
mysql> select concat(round(sum(DATA_LENGTH/1024/1024),2),'MB') as data from TABLES where table_schema='hnmcc' and table_name='l_log_20160102';
+-----------+
| data |
+-----------+
| 4803.00MB |
+-----------+
1 row in set (0.00 sec)
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询