Skip to content

Mysql Connection Error: (2002) Connection refused #499

@javiergermanjesus

Description

@javiergermanjesus

I can see the wordpress panel in "//localhost:8080", but i can't pass the login.

I have this errors:

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.3. Set the 'ServerName' directive globally to suppress this message
wordpress_1  | AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.18.0.3. Set the 'ServerName' directive globally to suppress this message
wordpress_1  | [Sun May 24 14:30:54.630523 2020] [mpm_prefork:notice] [pid 1] AH00163: Apache/2.4.38 (Debian) PHP/7.3.18 configured -- resuming normal operations
wordpress_1  | [Sun May 24 14:30:54.630580 2020] [core:notice] [pid 1] AH00094: Command line: 'apache2 -D FOREGROUND

when i try "sudo docker-compose -f stack.yml up"

I'm using Fedora 30, but in windows i save a similar problem.
"Access denied for exampleuser@172.18.0.3....."

I haver installed docker, then i run:

"$docker pull wordpress
$docker run --name some-wordpress -p 8080:80 -d wordpress
$sudo docker-compose -f stack.yml up"

The "stack.yml" is:

version: '3.1'

services:

  wordpress:
    image: wordpress
    restart: always
    ports:
      - 8080
    environment:
      WORDPRESS_DB_HOST: db
      WORDPRESS_DB_USER: exampleuser
      WORDPRESS_DB_PASSWORD: examplepass
      WORDPRESS_DB_NAME: exampledb
    volumes:
      - wordpress:/var/www/html

  db:
    image: mysql:5.7
    restart: always
    environment:
      MYSQL_DATABASE: exampledb
      MYSQL_USER: exampleuser
      MYSQL_PASSWORD: examplepass
      MYSQL_RANDOM_ROOT_PASSWORD: '1'
    volumes:
      - db:/var/lib/mysql

volumes:
  wordpress:
  db:

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionUsability question, not directly related to an error with the image

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions