0

I am trying to deploy a Laravel project on an AWS instance. I followed this tutorial to get the web server and mysql setup:

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-LAMP.html

Then installed composer , deployed the Laravel project on the instance ,changed some http configs and some other settings and got it working ,

Now I am trying to migrate my local database using , php artisan migrate

Every time I try though, I get :

 [PDOException]
 SQLSTATE[HY000] [2002] No such file or directory

I tried some solutions in this question :PDOException SQLSTATE[HY000] [2002] No such file or directory, but didn't succeed

Here is how my .env file looks like for database configs:

DB_CONNECTION=mysql
DB_HOST=<db end point>
DB_PORT=3306
DB_DATABASE=projectFirst
DB_USERNAME=<userName>
DB_PASSWORD=<password>
Snedden27
  • 1,870
  • 7
  • 32
  • 60

1 Answers1

0

I got it working by running

Composer update

Also had to point the DB host to 'localhost '

Snedden27
  • 1,870
  • 7
  • 32
  • 60