1、进入MQSQL命令行界面

用SQL语句查看数据库数据量的大小

2、输入密码

用SQL语句查看数据库数据量的大小

3、输入命令 

用SQL语句查看数据库数据量的大小 

1、进入information_schema 数据库(存放了其他的数据库的信息)

use information_schema;

 

2、查询所有数据的大小:

select concat(round(sum(data_length/1024/1024),2),'MB') as data from tables;

 

3、查看指定数据库的大小:

比如查看数据库databasesystem的大小

select concat(round(sum(data_length/1024/1024),2),'MB') as data from tables where table_schema='databasesystem';

 

4、查看指定数据库的某个表的大小

比如查看数据库databasesystem中 user表的大小

select concat(round(sum(data_length/1024/1024),2),'MB') as data from tables where table_schema='databasesystem' and table_name='user';

 参考自:https://blog.csdn.net/atec2000/article/details/7041352

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-07-31
  • 2021-11-29
  • 2022-12-23
  • 2022-12-23
  • 2021-12-04
猜你喜欢
  • 2022-01-09
  • 2022-12-23
  • 2021-07-09
  • 2021-06-17
  • 2022-12-23
  • 2021-05-30
  • 2021-12-23
相关资源
相似解决方案