Why does Doctrine say it can't find the PDO driver?

Yeah, if you type php -m at the command line, it should list both PDO and pdo_mysql. In my case it showed only PDO which is why it could not find the MySQL driver.

As you've already commented, I think it's because the PHP CLI cannot find a suitable php.ini file.


You need to configure correctly your php cli, to load the same extensions that the web server version has configured to load.

Here is a link on where PHP searches for the configuration file


sudo apt-get install php5-mysql

will do the magic