Enable MySQL/MariaDB SSL for PDO/Laravel

Server side setup Refer to this manual from MariaDB https://mariadb.com/kb/en/securing-connections-for-client-and-server/ require_secure_transport = ON could be added to the my.cnf file to enforece SSL for all connections (including those from localhost & unix socket) One way SSL Without CA verification PDO $pdo = new PDO(‘mysql:host=db.example.com;dbname=image’, ‘laravel’, ‘laravel’,array( PDO::MYSQL_ATTR_SSL_VERIFY_SERVER_CERT => false)); Laravel Read more…