docker启动mysql报错Error starting userland proxy: listen tcp4 0.0.0.0:3306: bind: address already in use

1、问题描述

Error response from daemon: driver failed programming external connectivity on endpoint mysql (11c5baee97c46d1f911f0ab48f5ee59b918dd27954102d40177997cba255962f): Error starting userland proxy: listen tcp4 0.0.0.0:3306: bind: address already in use

大概意思是linux的3306端口被占用了

2、解决方法

1、查看当前占用端口

netstat -tanlp

docker启动mysql报错Error starting userland proxy: listen tcp4 0.0.0.0:3306: bind: address already in use

2、杀死进程

kill 占用端口进程的PID

例如根据上图,则要杀死的PID为1330的进程

kill 1330

至此,就可以成功启动docker的mysql镜像了

上一篇:给Mysql服务添加防火墙策略,就这么简单


下一篇:阿里云centos主机改sshd端口