报错
PDOException: SQLSTATE[HY000] [3159] Connections using insecure transport are prohibited while --require_secure_transport=ON.
解决(mysql连接配置)
<?php
return [
// 各种数据库配置
'connections' => [
'mysql' => [
...
'sslmode' => 'prefer',
'options' => getenv('DB_SSL') == 'true'?[
PDO::MYSQL_ATTR_SSL_KEY => '路径/DigiCertGlobalRootCA.crt.pem'
]:[]
],
],
];