可以使用以下命令查看MySQL数据库大小:

SELECT table_schema AS "Database name",
ROUND(SUM(data_length + index_length) / 1024 / 1024, 2) AS "Database size (MB)"
FROM information_schema.tables
GROUP BY table_schema;

该命令将返回所有数据库的名称和它们的大小(以MB为单位)。

mysql 命令行查看数据库大小

原文地址: https://www.cveoy.top/t/topic/bq1e 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录