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;}