skip to Main Content

django.db.utils.OperationalError when running MySQL/MariaDB in Docker: Lost connection to MySQL server at 'reading initial communication packet'

Running MySQL/MariaDB in a Docker container: docker run -p 3306:3306 --name $(DATABASE_NAME) -v /tmp/mysql:/var/lib/mysql -e MYSQL_DATABASE=$(DATABASE_NAME) -e MYSQL_USER=$(DATABASE_USER) -e MYSQL_ROOT_PASSWORD=$(DATABASE_PASSWORD) -d mariadb:latest > /dev/null And then running Django version 4 locally with: manage.py runserver 127.0.0.1:8000 Error django.db.utils.OperationalError: (2013, "Lost connection…

VIEW QUESTION
Back To Top
Search