500 error when connecting to Linode Database cluster
I am trying to connect to a Linode Databse cluster via mysqli_connect in a php page. The page throws a 500 error.
I have checked:
connecting to a local database works fine.
I have re-copied again the host, username and password details multiple times, just to be sure.
connecting via mysql workbench on my local computer works fine using the same host, username and password.
trying to get the page to give info on a failure to connect does nothing, info does not load, just 500 error page.
Installed phpmyadmin on the same server as the php page, to see if it's an issue between the two specific servers, phpmyadmin connects fine using the same host, username & password, shows an error of "Connections using insecure transport are prohibited while --require_secure_transport=ON" at the bottom of every page, but regardless of that it connects, shows the databases and I am able to create insert and delete tables and records with no issues.
The error log shows "Connections using insecure transport are prohibited while --require_secure_transport=ON" as well.
PHP Version 8.1.2
Apache/2.4.52 (Ubuntu)
mysqlnd 8.1.2
I would greatly appreciate any pointers in the potential right direction.
1 Reply
Now I am getting a different error: Connections using insecure transport are prohibited while --require_secure_transport=ON
This error is also showing in phpmyadmin at the bottom of every page, regardless of that it connects, shows the databases and I am able to create insert and delete tables and records with no issues.
Still no idea how to fix things.
I have setup SSL with certbot and let's encrypt, and phpmyadmin shows under https just fine, so it seems like it is all secure.