1、报错如下一

Error response from daemon: driver failed programming external connectivity on endpoint lnmp_mysql (61ce99378a4416221af9f6da52209b4473561a311f99e2ffa8b889915eafb56a): (iptables failed: iptables --wait -t nat -A DOCKER -p tcp -d 0/0 --dport 3308 -j DNAT --to-destination 172.17.0.2:3306 ! -i docker0: iptables: No chain/target/match by that name.

(exit status 1))
Error: failed to start containers: 005afd180cd7

docker之故障问题解决方案

解决方案如下

清空防火墙规则,重启docker

[root@node03 web]# iptables -F
[root@node03 web]# iptables -t nat -F
[root@node03 web]# service iptables save
[root@node03 web]# service iptables restart

[root@node03 web]# systemctl restart docker

注释:因为docker的规则会自己在iptables 里面生产,如果没有清空规则,会有诸多限制。

2、Navicat 远程连接docker容器中的mysql 报错1251 - Client does not support authentication protocol 解决办法

docker之故障问题解决方案

 

解决方法如下:

1、登录到mysql容器中

[root@node03 web]# docker exec -it lnmp_mysql bash

2、在登录mysql

root@8e84ab34e6fe:/# mysql -uroot -p

docker之故障问题解决方案

3、授权用户访问

 

mysql> ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '123456';
Query OK, 0 rows affected (2.29 sec)

mysql> flush privileges;
Query OK, 0 rows affected (0.39 sec)

docker之故障问题解决方案

 

4、数据库可以链接了

docker之故障问题解决方案

 

相关文章:

  • 2021-06-03
  • 2021-07-17
  • 2021-04-29
  • 2021-05-31
  • 2021-06-08
  • 2021-09-14
  • 2022-12-23
  • 2021-09-24
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-14
  • 2021-09-05
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案