找不到驱动程序(SQL:select user_id

I am getting this error

could not find driver (SQL: select user_id... ]

I've looked at other related questions and tried the suggestions but I am still getting the same error.

My PHP.ini has extension=php_pdo_mysql.dll

I've added "doctrine/dbal": "^2.5",

I've also tried clearing cache, config, dump auto load etc.

phpinfo() shows there are no PDO drivers.

Previously my phpstorm was pointing at a PHP installation that didn't have extension=php_pdo_mysql.dll enabled but I am still getting the same error even after pointing it to the correct PHP folder.

You need to install PDO drivers first and if it did not solve your problem then below is the issue I have faced before maybe that will help.

sudo apt-get install php5.6-mysql/php7.2-mysql

You also can search for other database systems.

You also can search for the driver:

sudo apt-cache search drivername

Then Run the cmd php artisan migrate

You can also try:

sudo apt-get install php-sqlite3

also check the path for php-cli

If you can, run :

composer update

composer require doctrine/dbal

It looks like you have a missing dependency

Edit:

You might need to comment out the following in your php.ini file.

;extension=pdo_mysql.so

Taken from this post: Laravel 5 PDOException Could Not Find Driver . I think I had to do something exactly like this when setting up laravel on digital ocean.

There must be Query like this one in the code implode inside SQL code. check the variable $mistakeIdArr should not be empty.

 $sql = "Select * from `mistake` where `id` in (".implode(',',$mistakeIdArr).")";

I have also checked in my code the PDO is enabled or not

if (extension_loaded('pdo')) { echo "pdo enable";die; }else{ echo "not enable";die;}