• Resolved okoestner

    (@okoestner)


    Hi,

    I try to install a WordPress instance ba using docker containers and docker compose.
    In the docker-compose.yml apply the database user name using a secrets file. When I bash into the sql container my specific database user has been put into the “User” table.

    Nevertheless, when opening my docker URL I just see “Error establishing a database connection”. Cannot find any furhter information in “docker logs …”.

    Any idea in how I can troubleshhot this issue any further?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Jorge Luiz

    (@jluizsouzadev)

    The issue you described above seems to be docker-related. So, I highly recommend you to have look at the following Docker documentation:

    https://docs.docker.com/engine/swarm/secrets/

    And check your docker-compose file out carefully again trying to find some possible error.

    • This reply was modified 1 year, 9 months ago by Jorge Luiz. Reason: Grammar fixing
    Thread Starter okoestner

    (@okoestner)

    Thanks, Jorge, for your reply.
    Although my secrets have successfully been passed into the container I switched to not using secret files to get WP running anyways.

    The following error message appears when browsing to my WP frontend (debug true in wp-config):

    Warning: mysqli_real_connect(): (HY000/1045): Access denied for user ‘mywpuser’@’192.168.64.3’ (using password: YES) in /var/www/html/wp-includes/wp-db.php on line 1653
    Access denied for user ‘mywpuser’@’192.168.64.3’ (using password: YES)

    Following is from my databse server:

    MariaDB [mysql]> select Host,User from user;
    +———–+————-+
    | Host | User |
    +———–+————-+
    | % | mywpuser |
    | % | root |
    | localhost | mariadb.sys |
    | localhost | root |
    +———–+————-+`

    Both the WP and the SQL container are located in the same docker network.
    Any further idea on how to troubleshoot this one?

    Thread Starter okoestner

    (@okoestner)

    Another information: When bashing into the mariadb container I am able to login to the database by using “mysql -u mywpuser -p”.
    So there obviously seem to be an issue when connecting with the given credentials from the WordPress container.

    Thread Starter okoestner

    (@okoestner)

    Everything works perfectly, now. Had a typo in the database user password…

    • This reply was modified 1 year, 9 months ago by okoestner.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Docker install fails using secrets’ is closed to new replies.