상세 컨텐츠

본문 제목

[MariaDB/Mysql] Ddatabase 용량 확인

Database/MariaDB | Mysql

by 호짱 HoZang 2020. 8. 6. 16:47

본문

SELECT table_schema "DB Name",
    ROUND(SUM(data_length + index_length) / 1024 / 1024, 1) "MB" 
FROM information_schema.tables 
GROUP BY table_schema; 

 

SELECT SUM(data_length+index_length)/1024/1024 "USED_MB", 
       SUM(data_free)/1024/1024 "FREE_MB"
FROM information_schema.tables;

관련글 더보기

댓글 영역