[SOLVED] Docker Image doesn't create tables #978
aarondvail
started this conversation in
General
Replies: 1 comment 3 replies
-
I can't reproduce, even using your same interesting all-caps $ docker network create wp
dc6c955242c5c67ede4e3417b5ba4caa424a58da9b521bd9dd9a05c8525f73c0
$ docker run -dit --env MYSQL_RANDOM_ROOT_PASSWORD=1 --env MYSQL_USER=exampleuser --env MYSQL_PASSWORD=examplepassword --env MYSQL_DATABASE=wordpress --network wp --name wp-mysql mysql:8
9bf4db1becb7af1abdb9a0ad09fbb5e6422ed650b5a7f99104cd151aaa9378aa
$ docker logs --tail=1 wp-mysql
2025-08-20T18:36:18.817980Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.4.6' socket: '/var/run/mysqld/mysqld.sock' port: 3306 MySQL Community Server - GPL.
$ docker run -dit --network wp --name wp --env WORDPRESS_DB_HOST=wp-mysql --env WORDPRESS_DB_USER=exampleuser --env WORDPRESS_DB_PASSWORD=examplepassword --env WORDPRESS_DB_NAME=wordpress --env WORDPRESS_TABLE_PREFIX=WP_ wordpress
aa80a186088a0b11e53efd0a810eca24a879676cf1b1e005a7b45c36222d9bee
$ docker logs wp-mysql
WordPress not found in /var/www/html - copying now...
Complete! WordPress has been successfully copied to /var/www/html
No 'wp-config.php' found in /var/www/html, but 'WORDPRESS_...' variables supplied; copying 'wp-config-docker.php' (WORDPRESS_DB_HOST WORDPRESS_DB_NAME WORDPRESS_DB_PASSWORD WORDPRESS_DB_USER WORDPRESS_TABLE_PREFIX)
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
[Wed Aug 20 18:36:50.639128 2025] [mpm_prefork:notice] [pid 1:tid 1] AH00163: Apache/2.4.65 (Debian) PHP/8.2.29 configured -- resuming normal operations
[Wed Aug 20 18:36:50.639152 2025] [core:notice] [pid 1:tid 1] AH00094: Command line: 'apache2 -D FOREGROUND'
$ docker container inspect --format '{{ .NetworkSettings.Networks.wp.IPAddress }}' wp
172.17.0.3
$ curl -fsSL http://172.17.0.3/ | grep '<title>'
<title>WordPress › Installation</title>
$ docker logs --tail=2 wp
172.17.0.1 - - [20/Aug/2025:18:39:38 +0000] "GET / HTTP/1.1" 302 364 "-" "curl/7.88.1"
172.17.0.1 - - [20/Aug/2025:18:39:38 +0000] "GET /wp-admin/install.php HTTP/1.1" 200 13684 "-" "curl/7.88.1" I then pulled up $ curl -fsSL http://172.17.0.3/ | grep '<title>'
<title>foo</title>
$ docker exec -it wp-mysql mysql -uexampleuser -pexamplepassword wordpress -e 'SHOW TABLES'
mysql: [Warning] Using a password on the command line interface can be insecure.
+-----------------------+
| Tables_in_wordpress |
+-----------------------+
| WP_commentmeta |
| WP_comments |
| WP_links |
| WP_options |
| WP_postmeta |
| WP_posts |
| WP_term_relationships |
| WP_term_taxonomy |
| WP_termmeta |
| WP_terms |
| WP_usermeta |
| WP_users |
+-----------------------+ |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I just downloaded the WordPress docker image
I'm essentially doing a docker run command to execute (bash script)
The MySQL server is also a container on the same host, connecting with FQDN. Users created, DB created.
Once Container starts I get the error (and from what I read the infamous error):
stdout (or stderr) reports:
I would say that 100% of the internet blames either connectivity, wrong username, or wrong password. Or a combination there of.
That being said, I added a php file to /var/www/html.
credtest.php
and the results were:
So that being said, I'm not sure what the issue is... I've got good userID, password and host information.... I can connect... but I don't know what else I can do.... I set
WORDPRESS_DEBUG=true
But no extra log is created....
Beta Was this translation helpful? Give feedback.
All reactions