Support » Installing WordPress » Access denied using password on initial setup

  • I have a straightforward docker-compose configuration for prototyping a new site:

    
    version: "3.8"
    
    services:
      database:
        image: mariadb:10
        restart: always
        environment:
          MYSQL_RANDOM_ROOT_PASSWORD: 'true'
          MYSQL_DATABASE: ${MYSQL_DATABASE}
          MYSQL_USER: ${MYSQL_USER}
          MYSQL_PASSWORD: ${MYSQL_PASSWORD}
        volumes:
          - ./mounts/database:/var/lib/mysql
        networks: [internal]
      site:
        image: wordpress
        expose: [8080]
        environment:
          WORDPRESS_DB_HOST: database
          WORDPRESS_DB_USER: ${MYSQL_USER}
          WORDPRESS_DB_NAME: ${MYSQL_DATABASE}
          WORDPRESS_DB_PASSWORD: ${MYSQL_PASSWORD}
          WORDPRESS_DEBUG: 'true'
        depends_on: [database]
        volumes:
          - ./mounts/wordpress:/var/www/html
        networks:
          - web
          - internal
        labels:
          traefik.docker.network: web
          traefik.enable: "true"
          traefik.frontend.rule: Host:test-wp-podcast.tams.tech
          tech.tams.dns_hosts: test-wp-podcast.tams.tech
    
    networks:
      web:
        external: true
      internal:
        internal: true
    

    This looks like it should work, but when I open the page, I receive:

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

    Access denied for user 'wordpress'@'172.22.0.16' (using password: YES)

    If I simply SSH into the server and run

    mysql -h 172.28.0.2 -u wordpress -p

    …and paste the password which is the same as what is listed in env on the wordpress container, and it works, it logs in.

    • This topic was modified 1 week, 1 day ago by dscottboggs.
Viewing 1 replies (of 1 total)
  • Inese

    (@aitaslatvijas)

    Good afternoon! I have a website latvijas.aitas.eu. I haven’t edited this page since 2017. My wordpress username was aitas_latvijas. Error 403 when trying to log in to the website.
    I would like to make an access to edit my website as soon as possible.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.