docker로 mysql 구동 시 나타나는 버그

ounols·2021년 8월 28일
0


제가 오라클 클라우드에 있는 서버 컴퓨터의 cpu와 메모리용량을 살짝 바꿨는데
도커에 돌아가는 mysql 컨테이너에 문제가 생겼었습니다.

[Entrypoint] MySQL Docker Image 8.0.23-1.1.19
[Entrypoint] Starting MySQL 8.0.23-1.1.19
[System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.23) starting as process 24
[System] [MY-013576] [InnoDB] InnoDB initialization has started.
[System] [MY-013577] [InnoDB] InnoDB initialization has ended.
[System] [MY-011323] [Server] X Plugin ready for connections. Bind-address: '::' port: 33060, socket: /var/run/mysqld/mysqlx.sock
[Warning] [MY-010068] [Server] CA certificate ca.pem is self signed.
[System] [MY-013602] [Server] Channel mysql_main configured to support TLS. Encrypted connections are now supported for this channel.
[ERROR] [MY-010259] [Server] Another process with pid 30 is using unix socket file.
[ERROR] [MY-010268] [Server] Unable to setup unix socket lock file.
[ERROR] [MY-010119] [Server] Aborting
[System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.23)  MySQL Community Server - GPL.

전혀 문제가 없을 것 같은데 다른 프로세스가 이미 소켓을 쓴다고 뜨네요...
관련해서 구글링 해보니 해결 방법은 정말 간단했습니다.

그냥 mysql 폴더에 있는 mysql.sock.lock파일을 지우기만 하면 됩니다.
mysqld로 설치되신 분들은 mysqld.sock.lock파일을 지우시면 됩니다.


도커 세팅하면서 mysql 부분에 생각보다 자주 에러가 뜨는데
아마 소켓 관련 문제도 많다보니 이런 해결방법을 적용해보는 것도 추천드립니다ㅎㅎ

profile
(게임 엔진 프로그래머가 되고싶은) 게임 클라이언트 프로그래머

0개의 댓글