Symfony 5 Exception : une erreur est survenue dans le pilote : pilote introuvable.

leyell -  
ThomasEspritWeb Posted messages 8 Status Member -
Hello everyone

Actually, I am developing an application using the Symfony framework version 5
using xampp as a local server.

When I run the command to create my DB
php bin/console doctrine:database:create

an error appears: Exception occurred in driver: could not find driver

but in my phpinfo() PDO - pdo_mysql - pdo-sqlite are enabled

I try to configure the doctrine.yml, but it doesn't work.

So please, have you encountered such a situation before!
and how did you proceed to resolve it?!

And thank you very much

1 answer

  1. ThomasEspritWeb Posted messages 8 Status Member
     
    Hello,

    In your .env file (or .env.local depending on which one you are using), you need to write DATABASE in uppercase in the connection string

    DATABASE=mysql://root@127.0.0.1:3306/site
    -5