In this tutorial i’m going to solve the error SQLSTATE[HY000] [2002] No such file or directory (Connection: mysql, SQL: insert into oauth_clients
(user_id
, name
, secret
Error :-
SQLSTATE[HY000] [2002] No such file or directory (Connection: mysql, SQL: insert into `oauth_clients` (`user_id`, `name`, `secret`
Solutions:-
php artisan c:cache
php artisan passport:install
Next go to .env and put below code
DB_SOCKET=/opt/lampp/var/mysql/mysql.sock
Now error has been solved.