Monday, July 3, 2017

[Laraval5.4][Resolved] php artisan migrate [Illuminate\Database\QueryException] No such file or directory (SQL: select * from inform ation_schema.tables where table_schema = xxxxxxxx


Error message

 [Illuminate\Database\QueryException]
  SQLSTATE[HY000] [2002] No such file or directory (SQL: select * from inform
  ation_schema.tables where table_schema = xxxxxxxx and table_name = migrat
  ions)
  [PDOException]
  SQLSTATE[HY000] [2002] No such file or directory

Solution

What to do is your find out your unix_socket location first and then amend your config/database.php file:

Follow the link below to find out your unix_socket first, what i get is "/var/lib/mysql/mysql.sock"
[mysql][Resolved] find out your unix socket

Open your config/database.php file and place the path as value of unix_socket :


and then run your "php artisan migrate" again.

Reference

https://stackoverflow.com/questions/19475762/setting-up-laravel-on-a-mac-php-artisan-migrate-error-no-such-file-or-directory

No comments :

Post a Comment