Sunday, 19 April 2020

Connected!







Authentication error:
ER_NOT_SUPPORTED_AUTH_MODE: Client does not support authentication protocol requested by server; consider upgrading MySQL client

Solved by adding

command: --default-authentication-plugin=mysql_native_password

in the docker-compose.yaml file (found in the docker hub mysql image Readme file). Idea for the solution provided by
















https://stackoverflow.com/questions/50093144/mysql-8-0-client-does-not-support-authentication-protocol-requested-by-server

We also had issue with nodejs running before mysql server being ready. Changed entrypoint in docker-compose to app.js which does not connect to db. Then run dbhandler.js like the first image.

depends_on does not soleve the above issue. Scripts need to be created like the links below:




from https://docs.docker.com/compose/compose-file/

Solutions in case we need it in the future:

https://docs.docker.com/compose/startup-order/
Search for "No connections until MySQL init completes" in https://hub.docker.com/_/mysql
2 links are provided at the end.




No comments:

Post a Comment