SQLSTATE[HY000] [2002] Connection refused within Laravel homestead

I just ran into this and found that changing this in the .env file from 127.0.0.1 to localhost fixed it.

DB_HOST=localhost

Leave a Comment