I don't know if you were able to solve this or not, but this is what worked for me:
In your .env file change this
DB_HOST=localhost
for this
DB_HOST=mysql
I guess it's because you need to specify the name of the container running the database server and in docker-compose.yml the name for the mysql service is container_name: mysql.
Edit: I see now that the article clearly states that the value for DB_HOST needs to be mysql. For some reason my brain totally skipped that part...
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I don't know if you were able to solve this or not, but this is what worked for me:
In your .env file change this
for this
I guess it's because you need to specify the name of the container running the database server and in docker-compose.yml the name for the mysql service is
container_name: mysql
.Edit: I see now that the article clearly states that the value for DB_HOST needs to be
mysql
. For some reason my brain totally skipped that part...