How to resolve sqlstate hy000 error 2002 in laravel.
This type of error is occurred due to wrong database configration in .env file. Steps to resolve sqlstate hy000 error in Laravel framework.
- Double check your database credentials.
- Also try to change your env DB_HOST to localhost from 127.0.0.1
- Delete your config cache by running by running php artisan config:clear command.
This post is submitted by one of our members. You may submit a new post here.