connecting to a docker-compose mysql container denies access but docker running same image does not
问题 I am having some issues connecting to the mysql docker container that I have launched with docker-compose. This is a long post (sorry!). Here is my docker-compose.yml file: db: image: mysql:5.7 ports: - "3306:3306" # I have tried both ports and expose "3306". Still doesn't work environment: - MYSQL_ROOT_PASSWORD="secret" - MYSQL_USER="django" - MYSQL_PASSWORD="secret" - MYSQL_DATABASE="myAppDB" Then: $> docker-compose build db uses an image, skipping #expected! $> docker-compose up <<LOTS OF