fix problem:/usr/bin/docker-current: Error response from daemon: driver failed programming external connectivity on endpoint mysql-1

错误信息:
[root@server1 hjl]# docker run --name mysql-1 -p 3306:3306 -e MYSQL\_ROOT\_PASSWORD=123456 -d mysql
8bccbf191d394c28f424b17e04942e2d3c73d6c394cafd424fd1a96514a55028
/usr/bin/docker-current: Error response from daemon: driver failed programming external connectivity on endpoint mysql-1 (5e4dc0a7f4a8819c8f049d5ba255871c879da014ed1eb7e17afc5839cf360dda): iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 3306 -j DNAT --to-destination 172.17.0.8:3306 ! -i docker0: iptables: No chain/target/match by that name.
(exit status 1).
[
解决方法:
root@server1 hjl]# iptables -t nat -F
[root@server1 hjl]# ping 172.17.0.8
PING 172.17.0.8 (172.17.0.8) 56(84) bytes of data.
From 172.17.0.1 icmp_seq=1 Destination Host Unreachable
From 172.17.0.1 icmp_seq=2 Destination Host Unreachable
From 172.17.0.1 icmp_seq=3 Destination Host Unreachable
From 172.17.0.1 icmp_seq=4 Destination Host Unreachable
From 172.17.0.1 icmp_seq=5 Destination Host Unreachable
From 172.17.0.1 icmp_seq=6 Destination Host Unreachable
From 172.17.0.1 icmp_seq=7 Destination Host Unreachable
From 172.17.0.1 icmp_seq=8 Destination Host Unreachable
^C
--- 172.17.0.8 ping statistics ---
10 packets transmitted, 0 received, +8 errors, 100% packet loss, time 9008ms
pipe 4
[root@server1 hjl]# pkill docker
[root@server1 hjl]# iptables -t nat -F
[root@server1 hjl]# ifconfig docker0 down
[root@server1 hjl]# brctl delbr docker0
bash: brctl: command not found
[root@server1 hjl]# yum install -y brctl
Loaded plugins: fastestmirror
base | 3.6 kB 00:00:00
epel/x86_64/metalink | 5.8 kB 00:00:00
epel | 4.3 kB 00:00:00
extras | 3.4 kB 00:00:00
updates | 3.4 kB 00:00:00
(1/2): epel/x86_64/updateinfo | 817 kB 00:00:10
(2/2): epel/x86_64/primary_db | 4.8 MB 00:00:57
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* epel: ftp.riken.jp
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
No package brctl available.
Error: Nothing to do
[root@server1 hjl]# yum install bridge-utils
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* epel: mirror01.idc.hinet.net
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
Resolving Dependencies
--> Running transaction check
---> Package bridge-utils.x86_64 0:1.5-9.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================================
Package Arch Version Repository Size
====================================================================================================================================
Installing:
bridge-utils x86_64 1.5-9.el7 base 32 k

Transaction Summary
====================================================================================================================================
Install 1 Package

Total download size: 32 k
Installed size: 56 k
Is this ok [y/d/N]: y
Downloading packages:
bridge-utils-1.5-9.el7.x86_64.rpm | 32 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : bridge-utils-1.5-9.el7.x86_64 1/1
Verifying : bridge-utils-1.5-9.el7.x86_64 1/1

Installed:
bridge-utils.x86_64 0:1.5-9.el7

Complete!
[root@server1 hjl]# brctl delbr docker0
[root@server1 hjl]# systemctl start docker
[root@server1 hjl]# docker run --name mysql-1 -p 3306:3306 -e MYSQL\_ROOT\_PASSWORD=123456 -d mysql
/usr/bin/docker-current: Error response from daemon: Conflict. The name "/mysql-1" is already in use by container 8bccbf191d394c28f424b17e04942e2d3c73d6c394cafd424fd1a96514a55028. You have to remove (or rename) that container to be able to reuse that name..
See '/usr/bin/docker-current run --help'.
[root@server1 hjl]# docker run --name mysql-2 -p 3306:3306 -e MYSQL\_ROOT\_PASSWORD=123456 -d mysql
fb0d1d56a3957b348405812bb00170636d917e8f9b23af30679501eb055cff2d