Skip to content

Commit

Permalink
Added support for SSL database connections (roots#663)
Browse files Browse the repository at this point in the history
Passing the `DB_SSL` environment variable can trigger the use of SSL client connections to MySQL. This is especially useful for remote/managed databases where SSL certificates are required.
  • Loading branch information
clintonb authored Dec 18, 2022
1 parent bd68a5c commit 6dee846
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions config/application.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@
/**
* DB settings
*/
if (env('DB_SSL')) {
Config::define('MYSQL_CLIENT_FLAGS', MYSQLI_CLIENT_SSL);
}

Config::define('DB_NAME', env('DB_NAME'));
Config::define('DB_USER', env('DB_USER'));
Config::define('DB_PASSWORD', env('DB_PASSWORD'));
Expand Down

0 comments on commit 6dee846

Please sign in to comment.