Monday, 14 December 2015

laravel5 php artisan migrate error


Problem:
----------------------------------------------------------------------------------------------------------------------
[PDOException] occurs when i try to running php artisan migrate in laravel5

looks like here:
MacBook-Pro:laravel5-project user$ php artisan migrate:refresh --seed


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

Solution:
-----------------------------------------------------------------------------------------------------------------------
change host name in .env file
from:
DB_HOST=local host
to:
DB_HOST=127.0.0.1

It should be success when you try to run php artisan migrate again.

No comments:

Post a Comment