Symfony console doctrine PDO exception

symfony

#1

Hello there :slightly_smiling_face:,

I’m trying to start a symfony project with MySQL database. All is fine - I got the app_dev.php to work, then I created database but when i start the symfony console and enter the below:
php bin/console doctrine:schema:update --force

I got PDO exception “Could not find driver” and I’m not sure how to install this PDO addon. I have already tried adding new php.ini file into the master directory with extension=pdo_mysql.so but nothing happen it just says that this file do not exist.

So could you please help me with this?

Best wishes,
Niki


#2

Do you restart apache after modify php.ini?
Perhaps pdo_mysql is not installed:
https://stackoverflow.com/questions/2852748/pdoexception-could-not-find-driver


#3

Yes, I have restarted it and no change - the same error appeared.
When I reviewed phpinfo():
In section mysqlnd I have:
API Extensions mysqli,pdo_mysql

and in PDO section I have:
PDO drivers mysql, sqlite