I'm using a docker container for MySQL with docker-compose that works just fine.
The only problem is that I get the error unknown database "database_name" the first time I run it every day (after Windows startup)
After that, if I stop it and re-run it I get no errors and everything works fine.
yaml configuration:
version: "2.0"
services:
mysql:
container_name: mysql
restart: always
image: mysql:5.7
command: --max_allowed_packet=32505856
ports:
- "3306:3306"
volumes:
- 'C:\data\mysql_db:/var/lib/mysql/'
environment:
MYSQL_ALLOW_EMPTY_PASSWORD: "yes"
networks:
- shared
networks:
shared:
external:
name: shared
EDIT: here is a pastebin of the logs of a startup: https://pastebin.com/aJiKJ4aE
MYSQL_DATABASE: database_namein environment would help ?