jeudi 28 mars 2019

Unable to connect mysql when deploying laravel using travis and elastic beanstalk

I was trying to deploy my code using Travis CLI into AWS cloud with the elastic beanstalk. However, I keep getting connection time-out.

.env file

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

travis log

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



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire