sqlstate hy000 error 2002 laravel

2019-12-07 11:47:48 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 127.0.0.1
  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