使用Travis和Elastic beantalk部署laravel时无法连接mysql

时间:2019-03-29 01:10:27

标签: mysql laravel-5 amazon-rds amazon-elastic-beanstalk

我试图使用Travis CLI通过弹性beantalk将代码部署到AWS云中。但是,我一直在保持连接超时。

.env文件

DB_CONNECTION=mysql
DB_HOST=aa1i820m4gfa6k8.--------.ap-southeast-1.rds.amazonaws.com
DB_PORT=3306
DB_DATABASE=aa1i820m4gfa6k8
DB_USERNAME=------
DB_PASSWORD=--------

travis日志

before_script.1
0.22s$ php artisan key:generate
0.22s$ php artisan config:clear
Configuration cache cleared!
30.30s$ php artisan migrate:refresh
In Connection.php line 664:

  SQLSTATE[HY000] [2002] Connection timed out (SQL: select * from information  
  _schema.tables where table_schema = aa1i820m4gfa6k8 and table_name = migrat  
  ions)                                                                        

In Connector.php line 67:

  SQLSTATE[HY000] [2002] Connection timed out

enter image description here

0 个答案:

没有答案