You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to debug an issue connecting to a vendor's database, and they recommended connecting with TLS.
Connection worked fine when run against my local Dockerized MySQL-8 container, but when I set the MySQL flag require_secure_transport it would disconnect (HY000 Connections using insecure transport are prohibited), as expected.
I modified the 2-simple-query.php file to read:
$context = (new Socket\ConnectContext)->withTlsContext(new Socket\ClientTlsContext(DB_HOST));
$config = new Mysql\ConnectionConfig(DB_HOST, 3306, DB_USER, DB_PASS, DB_NAME, $context);
However, this results in a promptly closed connection.
@trowski I don't remember the details, but we ended up not requiring this so I never went further. In addition, our vendor upgraded our production environment a few months later which broke the library and I had to revert to a synchronous wrapper. I haven't had a chance to revisit the project since.
I'm trying to debug an issue connecting to a vendor's database, and they recommended connecting with TLS.
Connection worked fine when run against my local Dockerized MySQL-8 container, but when I set the MySQL flag require_secure_transport it would disconnect (HY000 Connections using insecure transport are prohibited), as expected.
I modified the 2-simple-query.php file to read:
However, this results in a promptly closed connection.
Debug output (without TLS context):
Debug output (with TLS context):
If you can include an example for how to connect to a server that requires secure transport, it would be helpful.
The text was updated successfully, but these errors were encountered: