여러번 docker mysql을 켰다가 껏다가를 반복하였다. 이는 내부적으로 docker VM의 용량을 잡아먹는 데 이를 몰랐다.
아래는 docker compose up -d 이후 docker compose ps로 실행되지 않는 것을 확인한 뒤 로그를 조회한 것이다.
docker compose logs mysql --tail=200
mysql-1 | 2025-11-10 15:14:11+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 9.5.0-1.el9 started.
mysql-1 | 2025-11-10 15:14:12+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
mysql-1 | 2025-11-10 15:14:12+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 9.5.0-1.el9 started.
mysql-1 | 2025-11-10 15:14:12+00:00 [Note] [Entrypoint]: Initializing database files
mysql-1 | 2025-11-10T15:14:12.241547Z 0 [System] [MY-015017] [Server] MySQL Server Initialization - start.
mysql-1 | 2025-11-10T15:14:12.242229Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 9.5.0) initializing of server in progress as process 80
mysql-1 | 2025-11-10T15:14:12.246021Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
mysql-1 | 2025-11-10T15:14:12.261544Z 1 [Warning] [MY-012638] [InnoDB] Retry attempts for writing partial data failed.
mysql-1 | 2025-11-10T15:14:12.261563Z 1 [ERROR] [MY-012639] [InnoDB] Write to file ./ibdata1 failed at offset 0, 1048576 bytes should have been written, only 0 were written. Operating system error number 28. Check that your OS and file system support files of this size. Check also that the disk is not full or a disk quota exceeded.
mysql-1 | 2025-11-10T15:14:12.261572Z 1 [ERROR] [MY-012640] [InnoDB] Error number 28 means 'No space left on device'
mysql-1 | 2025-11-10T15:14:12.261575Z 1 [ERROR] [MY-012267] [InnoDB] Could not set the file size of './ibdata1'. Probably out of disk space
mysql-1 | 2025-11-10T15:14:12.261585Z 1 [ERROR] [MY-012929] [InnoDB] InnoDB Database creation was aborted with error Generic error. You may need to delete the ibdata1 file before trying to start up again.
mysql-1 | 2025-11-10T15:14:12.765399Z 0 [ERROR] [MY-010020] [Server] Data Dictionary initialization failed.
mysql-1 | 2025-11-10T15:14:12.765474Z 0 [ERROR] [MY-013236] [Server] The designated data directory /var/lib/mysql/ is unusable. You can remove all files that the server added to it.
mysql-1 | 2025-11-10T15:14:12.765484Z 0 [ERROR] [MY-010119] [Server] Aborting
mysql-1 | 2025-11-10T15:14:12.767268Z 0 [System] [MY-015018] [Server] MySQL Server Initialization - end.
해당 오류에서
Operating system error number 28. Check that your OS and file system support files of this size. Check also that the disk is not full or a disk quota exceeded.
이 부분을 확인한 결과 해당 오류는 도커 VM 디스크가 꽉찼다는 의미인 것 같았다.
따라서 디스크 여유 공간을 확보하기 위해서 아래 명령어를 실행했다. 다음 명령어는 실행시 유의해야 한다. 원치않는 볼륨이 삭제될 수 있다.
# 중지된 컨테이너 삭제
docker container prune
# 태그 없는(dangling) 이미지 삭제
docker image prune
# 사용하지 않는 네트워크 삭제
docker network prune
# 사용하지 않는 볼륨 삭제 (주의: DB 등 데이터 사라짐)
docker volume prune
datagrip에서 정상적으로 데이터베이스 조회가 가능한 것을 확인할 수 있었다.
여기서 사용한 드라이버의 버전은 warning이 발생했지만 높은 버전의 경우 아래 에러가 발생하였다.
Public Key Retrieval is not allowed
출처:
https://swaneel.tistory.com/20
[유디니의 프로그래밍쓰:티스토리]
'Portfolio 제작기' 카테고리의 다른 글
| 리액트 프로젝트 깃허브 페이지로 배포하기 (Github Actions #2) (0) | 2025.11.11 |
|---|---|
| Github Actions는 무엇인가? (Github Actions #1) (0) | 2025.11.11 |
| Spring boot 의 Controller, Model, Repository 작성(간단한 예시) (0) | 2025.11.10 |
| Spring boot와 docker mysql 연결 과정 정리(트러블 슈팅 포함) (0) | 2025.11.10 |