How would I setup my database config.php file to use a secure connection from the grid to the MySQL server please? Referencing a .crt.pem file.
Hi,
I researched on your question but the database library wrapper we are currently using (php-adodb) does not support ssl database connection settings.
The change in core library is doable but it will break with the future changes.
You can change lib/inc/adodb/drivers/adodb-mysqli.inc.php
On line 112 before mysqli_real_connect, you can call: mysqli_ssl_set as in https://stackoverflow.com/questions/23342604/cant-connect-with-pdo-using-ssl-but-mysqli-with-ssl-works
Perfect, thanks! This was the key to getting it to work.
examples,
//mysqli
$conn=mysqli_init();
mysqli_ssl_set($conn, $clientkey, $clientcert, $sharedca, NULL, NULL);
if (!mysqli_real_connect($conn, $host, $user, $pass, $db))
{
die("Failed connecting to ssl mysql via mysqli");
}
Also, the php formatting example here:
https://docs.microsoft.com/en-us/azure/mysql/howto-configure-ssl