symfony-6-es-cqrs-boilerplate: An exception occurred in driver: SQLSTATE[HY000] [2002] Connection refused
Hi there,
In a nutshell:
When the script runs this command:
sudo docker-compose -f docker-compose.yml -f etc/dev/docker-compose.yml exec -T php sh -lc './bin/console d:d:d --force --if-exists'
it displays the following error:
An exception occurred in driver: SQLSTATE[HY000] [2002] Connection refused
Please, refer to the attached log file for more information. log_make_start (1).log
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 21 (10 by maintainers)
Nice. Will merge then and close this one.
This is what I do:
In your case checkout to the patch branch first
I’ll add an extra step call
wait-for-mysql
to make it less error prone. ThanksMmm very rare, all seems healthy. Can you try the
make start
sstep by step? You just need to follow the makefileCan you pass the output of
docker logs cqrs_symfony_mysql_1
to see if mysql is ready to accept connections? It can be slow depending of how many resources you use.