PHP Laravel: No connection could be made because the target machine actively refused it

I changed the ip address specified in the homestead.yaml from localhost to 192.168.10.10. Then I ran homestead provision and that seemed to fix the problem. The host machine cannot resolve localhost or 127.0.0.1 because that is already mapped to itself.


sometimes maybe caching problem:

    php artisan config:clear

I'm having the same problem with Wampserver. It’s worked for me:

You must change this file: "C:\wamp\bin\mysql[mysql_version]\my.ini" For example: "C:\wamp\bin\mysql[mysql5.6.12]\my.ini"

And change default port 3306 to 80. (Lines 20 & 27, in both) port = 3306 To port = 80

I hope this is helpful.

And then Just Go to your Control panel and start Apache & MySQL Services.