“No such file or directory” or “No such host is known” when running migrations

If you are using localhost as your DATABASE_HOST in the .env file, change it to 127.0.0.1, then run php artisan config:clear and now try php artisan migrate:install again.

Leave a Comment