-
Notifications
You must be signed in to change notification settings - Fork 471
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught PHP Exception Doctrine\DBAL\Exception\ConnectionException #72
Comments
Hiya, Could you tell me a bit more about your problem? So if you can run command through Symfony and you cannot with whatever PHP service, maybe the service don't use the same Connection Provider. Isn't it? Regards |
I can use creds from env files and enter via pma to database. I can create entity and update schema inside of php container, so mysql works. But symfony app can't connect to database. |
I have same problem ... mysql works, creating schema works, i can connect to db via SQL client but via web i can't connect. Same error: |
Make sure that you have changed app/config/parameters.yml as was mentioned in 4. Prepare Symfony app of installation. |
Sure I had checked it.
But I still can connect from local machine. This goes on mac. |
Same on Ubuntu:
|
I have the same problem |
I solved problem by replacing localhost (or 127.0.0.1) by "db". You can see my configuration below:
And in docker-compose file:
|
Having the same problem. What a nightmare¡
this is my docker-compose version: '3.1' services: db: Any idea? |
parameters:
database_host: db
database_port: 5500
database_name: agency
database_user: root
database_password: pass
mailer_transport: smtp
mailer_host: 127.0.0.1
mailer_user: null
mailer_password: null
secret: ThisTokenIsNotSoSecretChangeIt @mgm2030 this should work :) |
Hi, thanks for your work.
I have a problem, which I can't handle by self. All things configured as described in readme. And generally symfony app works, but until I don't try to make a query. Confusing thing is what I can create database, update scheme, but can't perform queries in my app. I checked log files this is the message. I have no idea how to solve it. Could you give any tip about this issue?
Thanks.
Uncaught PHP Exception Doctrine\DBAL\Exception\ConnectionException: "An exception occured in driver: SQLSTATE[HY000] [2002] Connection refused" at /var/www/symfony/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 103 {"exception":"[object ] (Doctrine\\DBAL\\Exception\\ConnectionException(code: 0): An exception occured in driver: SQLSTATE[HY000] [2002] Connection refused at /var/www/symfony/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:103, Doctrine\\DBAL\\Driver\\PDOException(code: 2002): SQLSTATE[HY000] [2002] Connection refused at /var/www/symfony/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:47, PDOException(code: 2002): SQLSTATE[HY000] [2002] Connection refused at /var/www/symfony/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:43)"} []
The text was updated successfully, but these errors were encountered: