Skip to content

Can not connect to database #3

@adiatma85

Description

@adiatma85

Hello @victorsteven , first, I like to say thank you about the tutorial that you write here

I have some kind of problem when use this repository as reference, when I run docker-compose up
the app can not run and have error messages like this
image

In docker-compose.yml, the configuration is like this

fullstack-mysql:
    image: mysql:5.7
    container_name: full_db_mysql
    ports: 
      - 3306:3306
    environment: 
      - MYSQL_ROOT_HOST=${DB_HOST} 
      - MYSQL_USER=${DB_USER}
      - MYSQL_PASSWORD=${DB_PASSWORD}
      - MYSQL_DATABASE=${DB_NAME}
      - MYSQL_ROOT_PASSWORD=${DB_PASSWORD}
    volumes:
      - database_mysql:/var/lib/mysql
    networks:
      - fullstack

(It's sync with .env file)
I can not figure out why I found error while running docker-compose, but I can assure that mysql container is running

Any one have a lead why this is happen?
Thanks in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions