docker wordpress 提示:Error establishing a database connection
从docker PUll的WordPress 和 mariadb启动后,提示Error establishing a database connection,网上查找原因,放到基本配置,但没有解决,查看日志有以后错误:mysqli::__construct(): (HY000/2002): No route to host in Standard input code on line 22MySQ
从docker PUll的WordPress 和 mariadb
启动后,提示Error establishing a database connection,网上查找原因,放到基本配置,但没有解决,查看日志有以后错误:
mysqli::__construct(): (HY000/2002): No route to host in Standard input code on line 22
MySQL Connection Error: (2002) No route to host
MySQL Connection Error: (2002) No route to host
MySQL Connection Error: (2002) No route to host
MySQL Connection Error: (2002) No route to host
MySQL Connection Error: (2002) No route to host
MySQL Connection Error: (2002) No route to host
MySQL Connection Error: (2002) No route to host
MySQL Connection Error: (2002) No route to host
MySQL Connection Error: (2002) No route to host
MySQL Connection Error: (2002) No route to host
WARNING: unable to establish a database connection to '*******'
continuing anyways (which might have unexpected results)
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.3. Set the 'ServerName' directive globally to suppress this message
AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.3. Set the 'ServerName' directive globally to suppress this message
试着解决AH00558错误 ,无果,又解决2002错误 ,搞定。
nmcli connection modify docker0 connection.zone trusted
systemctl stop NetworkManager.service
firewall-cmd --permanent --zone=trusted --change-interface=docker0
systemctl start NetworkManager.service
nmcli connection modify docker0 connection.zone trusted
systemctl restart docker.service
也可以使用下面的命令:
firewall-cmd --permanent --zone=public --add-rich-rule=‘rule family=ipv4 source address=172.17.0.0/16 accept’ && firewall-cmd --reload
firewall-cmd --zone=trusted --change-interface=docker0 --permanent
firewall-cmd --zone=trusted --change-interface=brxxxxx --permanent
firewall-cmd --zone=trusted --change-interface=bryyyyy --permanent
魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐



所有评论(0)