¿ù°£ Àα⠰Խù°

°Ô½Ã¹° 138°Ç
   
µ¥ÀÌŸº£À̽º ¿ë·®
±Û¾´ÀÌ : ÃÖ°í°ü¸®ÀÚ ³¯Â¥ : 2022-12-22 (¸ñ) 10:09 Á¶È¸ : 943
±ÛÁÖ¼Ò :
                          

Ãâó
https://zetawiki.com/wiki/MySQL_%EB%8D%B0%EC%9D%B4%ED%84%B0%EB%B2%A0%EC%9D%B4%EC%8A%A4_%EC%9A%A9%EB%9F%89_%ED%99%95%EC%9D%B8


1 databaseº° ¿ë·® È®ÀÎ
1.1 Äõ¸® ¡Ú

mysql> SELECT table_schema "Database", ROUND(SUM(data_length+index_length)/1024/1024,1) "MB" FROM information_schema.TABLES GROUP BY 1;
+--------------------+--------+
| Database           | MB     |
+--------------------+--------+
| hello              | 1086.7 | 
| information_schema |    0.0 |
| jmnote             |  217.3 |
| mysql              |    0.5 |
+--------------------+--------+
4 rows in set (0.01 sec)


1.2 du
[root@zetawiki ~]# du -h /var/lib/mysql
1.1G /var/lib/mysql/hello
779M /var/lib/mysql/ibdata1
5.1M /var/lib/mysql/ib_logfile0
5.1M /var/lib/mysql/ib_logfile1
36M /var/lib/mysql/jmnote
812K /var/lib/mysql/mysql
0 /var/lib/mysql/mysql.sock
2.2G /var/lib/mysql


2 Àüü ¿ë·® È®ÀÎ
2.1 Äõ¸®
mysql> SELECT SUM(data_length+index_length)/1024/1024 used_MB, SUM(data_free)/1024/1024 free_MB FROM information_schema.tables;
+---------------+---------------+
| used_MB       | free_MB       |
+---------------+---------------+
| 2775.87963295 | 5230.69857121 | 
+---------------+---------------+
1 row in set (1.04 sec)


2.2 du
[root@zetawiki ~]# du -sh /var/lib/mysql
2.2G /var/lib/mysql

À̸§ Æнº¿öµå
ºñ¹Ð±Û (üũÇÏ¸é ±Û¾´À̸¸ ³»¿ëÀ» È®ÀÎÇÒ ¼ö ÀÖ½À´Ï´Ù.)
¿ÞÂÊÀÇ ±ÛÀÚ¸¦ ÀÔ·ÂÇϼ¼¿ä.
   

 



 
»çÀÌÆ®¸í : ¸ðÁö¸®³× | ´ëÇ¥ : ÀÌ°æÇö | °³ÀÎÄ¿¹Â´ÏƼ : ·©Å°´åÄÄ ¿î¿µÃ¼Á¦(OS) | °æ±âµµ ¼º³²½Ã ºÐ´ç±¸ | ÀüÀÚ¿ìÆí : mojily°ñ¹ðÀÌchonnom.com Copyright ¨Ï www.chonnom.com www.kyunghyun.net www.mojily.net. All rights reserved.