I am getting this error when I add the configuration to Laravel/Lumen to connect by ssl to the MySQL server.
2018-05-16 10:42:45] lumen.ERROR: exception 'ErrorException' with message 'PDO::__construct(): this stream does not support SSL/crypto' in /var/www/project/vendor/illuminate/database/Connectors/Connector.php:56
I checked the installed php modules. It shows that openssl is installed with php -m and that php-mysqlnd is installed.
This is my configuration:
'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', 3306),
'database' => env('DB_DATABASE', 'forge'),
'username' => env('DB_USERNAME', 'forge'),
'password' => env('DB_PASSWORD', ''),
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => env('DB_PREFIX', ''),
'timezone' => env('DB_TIMEZONE', '+00:00'),
'strict' => false,
'options' => array(
PDO::MYSQL_ATTR_SSL_KEY => '/etc/ssl/certs/mysqlssl/key.pem',
PDO::MYSQL_ATTR_SSL_CERT => '/etc/ssl/certs/mysqlssl/cert.pem',
PDO::MYSQL_ATTR_SSL_CA => '/etc/ssl/certs/mysqlssl/ca-cert.pem',
),
And showing that mysql has ssl running:
via Chebli Mohamed

Aucun commentaire:
Enregistrer un commentaire