启动docker compose mysql提示端口号被占用的错误
1 | 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. |
查看使用3306端口号:
1 | netstat -aon|findstr 3306 |
1 | TCP 192.168.10.73:3306 104.17.143.163:443 ESTABLISHED 46132 |
查看指定 PID 的进程
1 | tasklist|findstr 46132 |
1 | Cloudflare WARP.exe 46132 Console 14 347,388 K |
结束进程
1 | taskkill /T /F /PID 46132 |
通过cmd命令查看哪些端口被禁用TCP协议:
1 | netsh interface ipv4 show excludedportrange protocol=tcp |
1 | 协议 tcp 端口排除范围 |
停止NAT网络:
1 | net stop winnat |
启动NAT网络:
1 | net start winnat |
参考
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 热爱生活!