-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Cannot connect with mariaDB and SSL with pdo_mysql #6464
Comments
Please find our documentation here: https://www.doctrine-project.org/projects/doctrine-dbal/en/4.0/reference/configuration.html Are you able to connect to that database using PDO directly? |
Not sure what you mean by PDO directly sorry but it used to work prior of updating (doctrine 2 and dbal 3) so Im thinking something must have changed with the new version (doctrine 3 and dbal 4). I have always used pdo_mysql driver with doctrine. Thank you for the doc link but it seems to be the same I posted. I cannot see any SSL argument for ssl configuration like |
Not sure if that helps but I noticed that in my if I have this syntax
I have this error
and with this syntax
I have this error
So Im thinking the correct syntax is without !php/const ? |
This is PDO: https://www.php.net/manual/en/book.pdo.php Are you able to connect to your database using only PDO?
You said that already. But right now, there are many moving parts involved. I'm trying to narrow down the problem which is why I'm asking questions.
Now I'm confused. In your initial post, you said, the problem appeared after upgrading Symfony from 6 to 7, now it's the ORM and DBAL that you've upgraded.
No, it is a different link. I'm pretty sure about that. 🙂
This is because we officially don't support SSL connections through PDO and we never have. I realize that it used to work through setting custom PDO driver options, but we don't have any tests for that scenario. That being said, I don't see any reason why this should have stopped working.
I'm pretty sure that this has never worked with any Symfony version. This is also not what you wrote in your initial post.
Which is again a completely different error message than in your initial post. But this looks more like the error message that I would've expected. Okay, you apparently changed a lot of things at the same time, including various dependencies and config files. And I have no idea what else has changed in your app or setup because your answers are inconsitent. My recommendation would be to take a step back, roll back to the point where your application still worked, repeat your changes in baby steps and test your app after each step. |
@derrabus Thank you for taking the time trying to help me out I assure you that PDO was working with ssl on SF 6 with doctrine 2 and dbal 3 sorry for the options change but that was me just trying to rule out a bad ssl connection. You say that PDO is not officially supported so I just installed mysqli and tried to go this route but honestly Im so confused
but Im now getting
the doc says ssl_key and ssl_cert nermind I changed it to sslcert and sslkey but then I get
as you can see that does not match the doc tried changing ssl_ca for sslcrl or sslrootcert but no luck at all.. is the doc wrong ? on a side note I also had to input the port in the conf file as it was not recognized as an INT from the env file. |
No. You're reading the documentation of DBAL, but you're writing configuration for DoctrineBundle. The bundle might use different naming for some settings or not support certain settings. I'm on a phone right now and can't look this up for you though. |
Ho I see you are right; they are postgre specific anyway |
Hello, I tried asking on slack but no answer
I have DBAL 4.04 and ORM 3
since then I noticed there is no ssl reference for the pdo_mysql driver in https://doctrine-dbal.readthedocs.io/en/4.0.x/reference/configuration.html
I cannot connect my symfony application running on docker to mariadb using ssl.
It Works fine without SSL (using user app instead of app_ssl)
Also used to work fine before upgrading from symfony 6 to 7
the certs are fine since they used to work before updating from SF6 to 7
symfony is based on php8.3
symfony error:
database log error:
docker compose
.env
users
symfony doctrine.yaml
my user has correct permissions and was created like this:
The text was updated successfully, but these errors were encountered: