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)

Most upvoted comments

Nice. Will merge then and close this one.

This is what I do:

mkdir qa
cd qa
git clone git@github.com:jorge07/symfony-5-es-cqrs-boilerplate.git
cd symfony-5-es-cqrs-boilerplate
make start
open http://127.0.0.1

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. Thanks

Mmm very rare, all seems healthy. Can you try the make start sstep by step? You just need to follow the makefile

Can 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.