client does not support authentication protocol requested by server, consider upgrading mysql client
Opened this issue · 2 comments
the mysql docker image is unpinned so I'm not sure if this is related.
Error connecting to database. Check your database settings. Here's some more information:
{"code":"ER_NOT_SUPPORTED_AUTH_MODE","errno":1251,"sqlMessage":"Client does not support authentication protocol requested by server; consider upgrading MySQL client","sqlState":"08004","fatal":true}
db:
image: mysql
command: --default-authentication-plugin=mysql_native_password
restart: always
expose:
- 3306
networks:
- app-tier
environment:
while we're at it, I'm guessing the mysql image should use .env.local, not the environment yaml keys. and the db_host in the example env should be "db", not "localhost"
example env should be "db", not "localhost
You're correct. That is something I will change in the sample file.
As for your particular issue, make sure that the
DB_USER=root
and
DB_PASS in the .env file is the same as MYSQL_ROOT_PASSWORD in your docker compose.
I'm guessing the mysql image should use .env.local, not the environment yaml keys
The variables passed to mysql image in your docker compose are used to create a root user in your mysql docker container.
The .env file is just for configuring how MMDL accesses your db. MMDL would need your DB username, password, IP etc. to make a connection, and those variables are passed in the .env file.