@sitesense I have been yeah. Got a project to work on out of work hours so it's taking up my time :)
@bashy good luck with that, you're overdue a break though. Don't think I've ever been on here and not seen your posts.
You're a legend and credit to Laracasts dude! Happy weekend :)
This hole MySQL on homestead thing is quite tricky if you want to run migrations inside&outside homestead. To do so, you probably have two choices:
- Changing homesteads mysql configuration (like bashy does)
- Change laravels database configuration
I personally prefer #2 since the homestead configuration is something maintained externally so you would have to track your own changes and apply them on updates afterwards. But the configurations of your own projects are something maintained by yourself.
I solved it by : in the .env file
DB_HOST=127.0.01:33060 <<<======
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret
Nothing worked for me until I changed DB_USERNAME to 'root' instead of 'homestead'
I have faced the same issue. While php migration works Via SSH perfectly, from my local bash it gave me the error.I changed the Port Number to 33060 in .env file it seems to be working. Dint change anything in the database file from config folder(laravel 5.3).
Trying to run "php artisan migrate" in a bash shell on Windows 10, virtual box, vagrant, homestead installation .. I was getting this error.
SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it.
As per the documentation you have to run the "php artisan migrate" command in your project folder logged into the virtual machine. Found this in the documentation
Please or to participate in this conversation.