Illuminate\Database\QueryException could not find driver

Created at 23-Feb-2022 , By samar

IlluminateDatabaseQueryException could not find driver

In this article, we will see how to solve "IlluminateDatabaseQueryException could not find driver".

You have to enable the pdo_mysql extension in php.ini file to avoid the error Illuminate\Database\QueryException could not find driver in Laravel
  • Enable pdo_mysql using php.ini file

    --PATH E:\laragon\bin\php\php-8.0.16-Win32-vs16-x64\php.ini
    extension=pdo_mysql
    

    Just remove the ; from the ;extension=pdo_mysql in the php.ini file to avoid the exception in Laravel.

    File path may be different.

Back to code snippet queries related laravel

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Buy Me A Coffee

Don't forget to share this article! Help us spread the word by clicking the share button below.

We appreciate your support and are committed to providing you valuable and informative content.

We are thankful for your never ending support.