Symfony doctrine: insert-sql - error "Could not find driver named mysql"

Hey, I'm new to symfony. I follow this joobet tutorial at symfony-project.com, I am there 3rd day http://www.symfony-project.org/jobeet/1_4/Doctrine/en/03 Whenever I type php symfony doctrine: insert-sql, I get the following error:

doctrine of creating tables Could not find a driver named mysql

I use it on WAMP. I have symfony present in C: \ wamp \ bin \ php \ php5.3.0 \ PEAR \ symfony and my project is present in C: \ wamp \ www \ jobeet Please help me solve this since I am stuck here and not I can move on.

+4
source share
1 answer

You need to enable the mysql PDO driver. You will need to edit 1 or 2 php.ini files, depending on your system.

First you need to edit the use of apache php.ini, you can find it by creating a new file that executes phpinfo (), check it through the browser and look for "php.ini".

The second is the one that uses the command line, open a terminal (start-run-cmd.exe) and run php -i > phpinfo.txt , then open a text file and search for "php.ini".

You are looking for part of its extensions, uncomment the line with pdo_mysql (delete at the beginning). After all this, restart apache and you will be fine.

+3
source

Source: https://habr.com/ru/post/1308211/


All Articles