MySQL in docker-compose -- access denied MySQL in docker-compose -- access denied docker docker

MySQL in docker-compose -- access denied


Most likely you have initialized the mysql data directory when these were different:

environment:- MYSQL_ROOT_PASSWORD='123'- MYSQL_ROOT_HOST='172.18.0.1'

MySQL image only honors those vars when the /var/lib/mysql directory is created.

So if you don't care about the data, empty your volume: /Users/user/Documents/.docker/mysql/data, or change the credentials manually from mysql terminal.