본문 바로가기
Project/Trouble Shooting

[Docker] Windows 도커 실행 오류 Ports are not available 해결 방법

by ryuneng 2025. 1. 24.
반응형

1. 오류

Cannot start Docker Compose application. Reason: compose [start] exit status 1. Container tasty-track-mysql Starting Error response from daemon: Ports are not available: exposing port TCP 0.0.0.0:3306 -> 0.0.0.0:0: listen tcp 0.0.0.0:3306: bind: Only one usage of each socket address (protocol/network address/port) is normally permitted.


2. 원인

  • 3306 포트번호가 이미 사용중이어서 발생한 오류였다.

3. 해결방법

  1. PowerShell 관리자 모드로 실행
  2. 명령어 입력
    1) netstat -ano | findstr :3306
    2) taskkill /f /pid {사용중인 번호, 예시에서는 7560} (3306 포트번호 사용하고 있는 자원 종료)
  1. 도커를 실행하는 명령어 입력
    • docker-compose -f docker-compose.yml up

4. 실행 완료 !!

  • 드디어 된다. 감격. 도와주신 팀원분들 감사합니다 !!!!!!

5. IntelliJ에서 MySQL 스키마 생성

  • Test Connection 완료 후 OK


Reference

 


< 해당 글은 velog에서 이전하며 옮겨온 글로, 가독성이 좋지 않을 수 있는 점 양해 부탁드립니다. >

🔗 velog 버전 보기 : https://velog.io/@ryuneng2/Docker-도커-실행-오류-Ports-are-not-available-해결-방법