sqlstate hy000 error 2002 laravel

2024-03-04 03:50:22 Dinesh Mishra Laravel

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.

  1. Double check your database credentials.
  2. Also try to change your env DB_HOST to localhost from
  3. 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.

Related Tricks