Laravel

SQLSTATE[HY000] [2002] Connection refused within Laravel

Pinterest LinkedIn Tumblr

I had the same problem and fixed just by converting the DB_HOST constant in the .env File FROM 127.0.0.1 into localhost

DB_HOST = localhost.

No need to change anything into config/database.php

Don’t forget to run

php artisan config:clear

Write A Comment

Faster PHP Cloud Hosting