1
我已經在AWS Elastic Beanstalk上部署了一個基於Yii2的應用程序,我還創建了帶有數據庫的RDS實例(它已經有表)在Elastic Beanstalk上。所有文件都正確上傳到AWS實例。PDO異常SQLSTATE [HY000] [2002]在Yii2上使用Elastic Beanstalk和RDS連接超時
文件/common/config/main-local.php有:
'components' => [
'db' => [
'class' => 'yii\db\Connection',
'dsn' => 'mysql:host=myConnection_string:3306;myDB',
'username' => 'myUsername',
'password' => 'myPassword',
'charset' => 'utf8',
],
有什麼不對?謝謝。