Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

726
Visualizações
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.

about 4 years ago · Santiago Trujillo
3 Respostas
Responde à pergunta

0

You must install mysql :

sudo apt install php-mysql
about 4 years ago · Santiago Trujillo Relatório

0

Ok, I made a very stupid mistake. I was editing the php.ini file, but I didn't renamed it to php.ini (it was php.ini-prod). Afterwards I just had to put the correct path in extension_dir and it's working.

Hopefully this helps others.

about 4 years ago · Santiago Trujillo Relatório

0

comment this line in your .env file. yourproject/.env

#DATABASE_URL="postgresql://db_user:db_password@127.0.0.1:5432/db_name?serverVersion=13&charset=utf8"file

and delete # in first of your mysql config code

set your username and password in this part

DATABASE_URL="mysql://usename:password@127.0.0.1:3306/test?serverVersion=5.7"
about 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda