0

Illuminate\Database\QueryException : SQLSTATE[HY000] [2002] Connection refused (SQL: select * from information_schema.tables where table_schema = pracatice and table_name = migrations)

apaderno
  • 28,547
  • 16
  • 75
  • 90
  • 2
    Does this answer your question? [Laravel SQLSTATE\[HY000\] \[2002\] Connection refused](https://stackoverflow.com/questions/41225720/laravel-sqlstatehy000-2002-connection-refused) – ᴄʀᴏᴢᴇᴛ Feb 19 '21 at 10:25

2 Answers2

0
  1. First check the composer require doctrine/dbal is installed if this composer is not installed then install it
  2. Check the database port number is correct or not with other information like DB_HOST=127.0.0.1,DB_PORT=3307,DB_DATABASE=pracatice,DB_USERNAME=root,DB_PASSWORD=
  3. Check the files permission for project this is also most important for running php artisan migrate
  4. Then retry php artisan migrate
Miqayel Srapionyan
  • 587
  • 2
  • 5
  • 15
0

In the .env file, try to change your DB_HOST from localhost to 127.0.0.1.