Symfony:驱动程序中发生异常:找不到带有MySQL的驱动程序 [英] Symfony: An exception occured in driver: could not find driver with mysql
问题描述
我正在尝试连接在服务器(docker)上运行的数据库(mysql).我正在Windows上编程.
I'm trying to connect with my DB (mysql) which is running on a server (docker). I'm programming on Windows.
在我的symfony项目中,我做了以下工作: parameters.yml
In my symfony project I have done the following: parameters.yml
->填写正确的参数
config.yml
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
所有这些之后,我得到以下错误:An exception occured in driver: could not find driver
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.
推荐答案
您必须安装mysql:sudo apt install php-mysql
You must install mysql : sudo apt install php-mysql
这篇关于Symfony:驱动程序中发生异常:找不到带有MySQL的驱动程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!