我们可以借助以下语句检查所有Mysql数据库的大小mysql> SELECT table_schema "Database", -> SUM(data_length + index_length)/1
mysql> SELECT table_schema "Database",
-> SUM(data_length + index_length)/1024/1024 "Size in MB"
-> FROM infORMation_schema.TABLES GROUP BY table_schema;
+--------------------+----------------+
| Database | Size in MB |
+--------------------+----------------+
| gaurav | 1.04785156 |
| information_schema | 0.00878906 |
| mysql | 0.68551350 |
| performance_schema | 0.00000000 |
| sample | 0.04687500 |
| tutorial | 0.03125000 |
+--------------------+----------------+
6 rows in set, 1 warning (0.33 sec)
--结束END--
本文标题: 如何查看所有MySQL数据库的大小?
本文链接: https://lsjlt.com/news/438448.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
2024-10-23
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
2024-10-22
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0