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

artisticre's avatar

PDOExcetion('Could not find driver')

I have a fresh install of composer, wamp64, and laravel 7. Trying to migrate my tables and I get the PDO Exception error. Someone said it could be a PHP conflict but I have no idea how to fix it.

php -v

PHP 7.4.9 (cli) (built: Aug 4 2020 11:51:50) ( NTS Visual C++ 2017 x64)
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
Wamp64 PHP version used is 7.4.9

I am running on Windows 10

0 likes
7 replies
manelgavalda's avatar

Hey, maybe you are missing the dbal driver:

composer require doctrine/dbal
manelgavalda's avatar

Are you sure you have the mysql_pdo driver installed? Check your extensions file and make sure that it isn't commented and that it's installed. In your php.ini:

extension=php_pdo_mysql.dll
artisticre's avatar

I see extension=pdo_mysql not commented out but nothing about the .dll

artisticre's avatar

the error I am getting now after dbal is

Doctrine\DBAL\Driver\PDOException::("could not find driver")

manelgavalda's avatar
Level 50

I think you just need to install the dbaldriver now:

composer update
composer require doctrine/dbal
artisticre's avatar

I did. still the same error. I do not see extension=php_pdo_mysql.dll in my php.ini. How do I get it there?

Please or to participate in this conversation.