I've created a MySQL DBaaS with compose.io. I can connect successfully with the normal mysql driver, however I can't get it working over SSL.
Here is my current config.
'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', 'sl-eu-lon-2-portal.10.dblayer.com'),
'port' => env('DB_PORT', '27574'),
'database' => env('DB_DATABASE', 'foo'),
'username' => env('DB_USERNAME', 'foo'),
'password' => env('DB_PASSWORD', 'bar'),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'strict' => true,
'engine' => null,
'options' => array(
'sslmode' => 'require',
'sslrootcert' => database_path('compose.pem'),
)
]
compose.pem contains a SSL Certificate (Self-Signed) provided by compose.io
However when I run
print_r(DB::select("SHOW STATUS LIKE 'Ssl_cipher'"));
I get the following result indicating SSL is not used.
Array
(
[0] => stdClass Object
(
[Variable_name] => Ssl_cipher
[Value] =>
)
)
Any help much appreciated