Debug School

rakesh kumar
rakesh kumar

Posted on

Laravel:Base table or view not found: oauth-private.key does not exist or is not readable in laravel

oauth-private-key-does-not-exist-or-is-not-readable-in-laravel

Error

I clone a project from gitlab written by Laravel Framework 6.13.1 that use passport library. As usual I first executed composer install but i got this error

Illuminate\Database\QueryException  : SQLSTATE[42S02]: Base table or view not found: 1146 Table 'wz_projects_ms.oauth_clients' doesn't exist (SQL: insert into `oauth_clients` (`user_id`, `name`, `secret`, `redirect`, `personal_access_client`, `password_client`, `revoked`, `updated_at`, `created_at`) values (?, Laravel Personal Access Client, mmU1wUzafRm1JVsXqb7mN4qgJAH0b59E7B28DyHw, http://localhost, 1, 0, 0, 2022-12-22 05:28:21, 2022-12-22 05:28:21))
Enter fullscreen mode Exit fullscreen mode

Solution

first look base table exist or not
then see oauth_clients table exist or npt

run

 php artisan passport:keys
Enter fullscreen mode Exit fullscreen mode

====or=============

php artisan migrate
Enter fullscreen mode Exit fullscreen mode

==========or===============

php artisan passport:install --force
Enter fullscreen mode Exit fullscreen mode

Top comments (0)