Django cannot connect to mysql
问题 So i put my django app and mysql inside docker container. Here is what i do Docker file FROM python:3 ENV PYTHONUNBUFFERED 1 WORKDIR /app COPY requirements.txt /app/requirements.txt RUN pip install -r requirements.txt COPY . /app and here is my docker-compose-yml version: '3' services: db: container_name: database image: mysql:8 ports: - "3306:3306" command: --default-authentication-plugin=mysql_native_password environment: - MYSQL_DATABASE=django_example - MYSQL_USER=root - MYSQL_PASSWORD