Update: I solved the issue using this solution.
While using homestead the ports are mapped as:
3306 -> 33060
80 -> 8080
I do development via my host so I have to use http://myoctoberapp:8080 and this is fine with me. But it’s annoying that whenever I do any artisan command such as php artisan plugin:refresh Acme.Plugin it gives me this error:
[PDOException]
SQLSTATE[HY000] [2002] Connection refused
I did the same command after I did a homestead ssh and then a cd myoctoberapp and executed it without any problem. So my guess is that inside the homestead VM artisan looks at the default port i.e. 3306 whereas outside; in the host; it sees 33060 and so it’s unable to execute. Anyway to fix this?
Last updated