Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

cjuday88's avatar

Laravel 8 - could not find driver

Hello, I've been up all night for this error. I have checked on phpinfo() that pdo_mysql is active on the server, but still I am getting this error.

I'm currently using namecheap shared hosting.

Please help :(

0 likes
1 reply
voladazi's avatar

i had a similar concern and then i applied the below, megasync

Illuminate\Database\QueryException

could not find driver (SQL: select * from information_schema.tables where table_schema = test and table_name = migrations and table_type = 'BASE TABLE')

at C:\xampp\htdocs\blog\vendor\laravel\framework\src\Illuminate\Database\Connection.php:671 667| // If an exception occurs when attempting to run a query, we'll format the error 668| // message to include the bindings with SQL, which will make this exception a 669| // lot more helpful to the developer instead of just the database's errors. 670| catch (Exception $e) { 671| throw new QueryException( 672| $query, $this-prepareBindings($bindings), $e 673| ); 674| } 675|

1 C:\xampp\htdocs\blog\vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php:70 PDOException::("could not find driver")

2 C:\xampp\htdocs\blog\vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php:70 PDO::__construct()

It is also available on tinytask

Please or to participate in this conversation.