[Solved] Lavarel execution: PHP artisan migrate reports an error

The errors are as follows.

Execute: php artisan migrate with error: </strong
[PDOException]
SQLSTATE[HY000] [2002] Connection refused

Solution:

Step 1: The host is misconfigured under the .env file, it should be mysql on virtual, so host=192.168.10.10

Step 2: Execute php artisan config:clear

Step 3: Execute php artisan  migrate

 

Similar Posts: