溫馨提示×

mysql查看數(shù)據(jù)庫大小

小億
89
2024-01-09 06:02:06
欄目: 云計(jì)算

可以使用以下命令查看MySQL數(shù)據(jù)庫大?。?/p>

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

這條命令會返回每個(gè)數(shù)據(jù)庫的大?。ㄒ訫B為單位)。

0