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


The error message indicates that a MySQL connection via socket is tried (which is not supported).

In the context of Laravel (artisan), you probably want to use a different / the correct environment. Eg: php artisan migrate --env=production (or whatever environment). See here.

5

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