0

I have the following docker-compose.yml

version: '3.9'

services:
  web:
    build: .
    container_name: web
    volumes:
      - .:/var/www/html
    ports:
      - 8000:80
    networks:
        - db_bridge

  db:
    image: mysql
    container_name: db
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: ${DATABASE_ROOT_PASSWORD}
      MYSQL_DATABASE: ${DATABASE_NAME}
      MYSQL_USER: ${DATABASE_USER}
      MYSQL_PASSWORD: ${DATABASE_PASSWORD}
    ports:
        - 3306:3306
    networks:
        - db_bridge

networks:
  db_bridge:
    driver: bridge

.env file looks as following:

###> Mysql ###
DATABASE_ROOT_PASSWORD=root
DATABASE_NAME=everphone
DATABASE_USER=demo
DATABASE_PASSWORD=password
###< Mysql ###
 DATABASE_URL="mysql://demo:password@db:3306/everphone?serverVersion=8.0"
###< doctrine/doctrine-bundle ###

However when i try to run:

bin/console make:migration

I get the following error:

An exception occurred in driver: SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client

Can you please tell me what is the problem here?

Dahab
  • 518
  • 1
  • 5
  • 23
  • see [this php / mysql8.0](https://stackoverflow.com/questions/52864853/how-to-get-mysql-8-to-run-with-laravel/52865317#52865317) related answer – danblack Jan 17 '21 at 03:05
  • or use [php-7.4.3+](https://bugs.mysql.com/bug.php?id=98048) – danblack Jan 17 '21 at 03:12

0 Answers0