Reputation: 6656
I'm new to laravel and I'm exploring how to do migrations. I created a new users table and when I run "php artisan migrate"
it gives me "[PDOException] SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it."
. I run "composer dump-autoload"
then did "composer install"
but no joy. I configured my .env file like below:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=francis
DB_USERNAME=homestead
DB_PASSWORD=secret
Upvotes: 3
Views: 689
Reputation: 1645
I think MySql service is not active. You have to active MySQL service. Because it's unable to connect with DB. Or I think disable proxy at web.config file try this.
<system.net>
<defaultProxy>
<proxy usesystemdefault="False"/>
</defaultProxy>
</system.net>
Upvotes: 0