PDOException: SQLSTATE[HY000] [3159]
Apache PHP 7.4 SSL Connecting to Linode Cluster Database
I have Apache PHP 7.4 Website and I am Prototyping connecting to Linodes new Cluster Databases. I am not able to connect to the MysQL 8 database.
Erroe Message :
PDOException: SQLSTATE[HY000] [3159] Connections using insecure transport are prohibited while --require_secure_transport=ON
Has anyone been able to solve this issue?
Also this is not a WordPress site or some toher Off the Shelf Application.
Thank you for your help.
3 Replies
PDOException: SQLSTATE[HY000] [3159] Connections using insecure transport are prohibited while --require_secure_transport=ON
So, either stop using --require_secure_transport=ON or set up secure transport on the MySQL port (3306).
-- sw
Everyone. I am using the Linode Database Clusters so --require_secure_transport=ON is requried.
The issue ended up being the options. They were incomplete on myside.
Upgrade to php 7.4 if you can
Create your options witht he following information
$options = array();
$options[PDO::MYSQL_ATTR_SSL_CA] = $ca_path;
$options[PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT] = false;Make sure the user in mysql is correct. for the Linode Cluster Databases you will need to create your own users for your application. Be sure to give it appropriate accesses.
This is what I can think of now.
If you have any questions on this issue please respond and I will try and answer with what I have found out. Also I will keep this up to date with things I find.