Create a database in Symfony

41 views Asked by At

I got the following error when I try to create a database by the terminal :

`PS D:\gestion\gestionprojet> php bin/console doctrine:database:create

Could not create database `gestionprojet` for connection named default
An exception occurred in the driver: could not find driver`

I changed my .env.dev.local by this :

DATABASE_URL=mysql://root:@127.0.0.1:3306/gestionprojet?serverVersion=5.7

Do you have any idea of what is happening ?

Do you have any idea of what is happening ?

It's my first time creating a Database

1

There are 1 answers

0
Carlos On

You might be missing the PDO driver. If your are using MySQL, make sure your php.ini file contains this uncommented line: extension=php_pdo_mysql.dll