Skip to content

Instantly share code, notes, and snippets.

@cryocaustik
Created August 24, 2021 14:48
Show Gist options
  • Save cryocaustik/324218ad35e68066b36f0decda4a9514 to your computer and use it in GitHub Desktop.
Save cryocaustik/324218ad35e68066b36f0decda4a9514 to your computer and use it in GitHub Desktop.
Laravel MySQL SSL Config
// add to mysql config
'sslmode' => 'require',
'options' => array(
PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT => false,
PDO::MYSQL_ATTR_SSL_KEY => '/etc/ssl/mysql/client-key.cer',
PDO::MYSQL_ATTR_SSL_CERT => '/etc/ssl/mysql/client-cert.cer',
PDO::MYSQL_ATTR_SSL_CA => '/etc/ssl/mysql/server-ca.cer',
),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment