Bootstrap

Error response from daemon: Cannot restart container mysql: driver failed programming external co

Error response from daemon: Cannot restart container mysql: driver failed programming external co nnectivity on endpoint mysql (1e1037a0ad79edfbd8780643fbeccf2fff9ad9a6433c9f0d4d2ec080a9dcdf65): (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 3306 -j DNAT --to-desti nation 172.17.0.2:3306 ! -i docker0: iptables: No chain/target/match by that name.
翻译过来大概意思:无法重新启动容器mysql,程序未能连接mysql的端口,因为3306端口是dport
解决办法:
1.启动3306de 端口:
iptables -A INPUT -ptcp --dport 端口号 -j ACCEPT
如果不行,重启docker
docker服务启动时定义的自定义链DOCKER会被清除
systemctl restart docker
然后启动mysql服务:docker start mysql

;