This is the second implementation of this docker setup on this computer. The other instance is down.
Using Docker v2.3.0.2.
Getting the following error when wordpress tries to connect to the DB:
wordpress_1 | [29-Jun-2020 16:21:05 UTC] PHP Warning: mysqli::__construct(): (HY000/2002): Connection refused in Standard input code on line 22
wordpress_1 | MySQL Connection Error: (2002) Connection refused
I tried adding a port number in the docker-compose file:
WORDPRESS_DB_HOST: "mysql:3306"
Which makes no difference as 3306 is the default:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b102252c592d wordpress:5.2.1-php7.3-apache "docker-entrypoint.s…" 3 seconds ago Up 2 seconds 80/tcp mobilize_wordpress_1
6448fddc84a4 jwilder/nginx-proxy:alpine "/app/docker-entrypo…" 4 seconds ago Up 2 seconds 0.0.0.0:80->80/tcp mobilize_proxy_1
a73cb3939262 mariadb:10.2 "docker-entrypoint.s…" 4 seconds ago Up 2 seconds 3306/tcp mobilize_mysql_1
add restart: unless-stopped to both wordpress and mariadb services.
Same error. Any ideas?
Additionally the following notice occurs:
wordpress_1 | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.29.0.4. Set the 'ServerName' directive globally to suppress this message
This is the second implementation of this docker setup on this computer. The other instance is down.
Using Docker
v2.3.0.2
.Getting the following error when wordpress tries to connect to the DB:
I tried adding a port number in the docker-compose file:
Which makes no difference as
3306
is the default:Based on this SO post, I have tried
docker restart wordpress
restart: unless-stopped
to bothwordpress
andmariadb
services.Same error. Any ideas?
Additionally the following notice occurs: