Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Symfony: An exception occured in driver: could not find driver with mysql

I'm trying to connect with my DB (mysql) which is running on a server (docker). I'm programming on Windows.

In my symfony project I have done the following: parameters.yml

-> filled in the correct parameters

config.yml

doctrine:
    dbal:
        driver: pdo_mysql
        host: '%database_host%'
        port: '%database_port%'
        dbname: '%database_name%'
        user: '%database_user%'
        password: '%database_password%'

php.ini

extension=php_mysqli.dll
extension=php_pdo_mysql.dll
extension=php_pdo_sqlite.dll

After all of this I get the following error: An exception occured in driver: could not find driver

Anyone who can help since I have tried some solutions that were provided but none worked or were for linux systems.

like image 425
Rafie Avatar asked Apr 06 '17 18:04

Rafie


1 Answers

You must install mysql :

sudo apt install php-mysql
like image 156
naruto Avatar answered Sep 20 '22 10:09

naruto