Closed diminDDL closed 1 year ago
Did you at any point start the db
service, stop it, and then later start it but with different environment values?
Short answer: docker-compose rm -fv
(assuming you have no important data already in mysql or ghost)
Long answer: https://github.com/docker-library/postgres/issues/203#issuecomment-255200501 (about postgres
, but mysql
behaves the same for this case)
Yes, I did try to change the credentials because the default example with unmodified variables has a different error related to not being able to find the db at all as far as I remember. I tried doing docker-compose rm -fv
and even did a full docker system prune -a
which re created the db
and prompted me to add MYSQL_ROOT_PASSWORD
as an environment variable. After re doing the above with the correct variables in place I still got a DatabaseError: connect ECONNREFUSED 172.20.0.2:3306
error.
Turns out that just waiting for a few minutes made the database finish initializing and it would connects and starts working as expected.
Trying to run the example compose file for ghost from here and getting the following errors, no matter what I try:
The config file looks like this: