问题描述
我使用的是 Mac,我已经下载了 Visual Studio Code 和 Mamp。我安装了 Symfony。我没有安装任何其他东西,在我看来我必须安装 MysqL ?我以为我不需要它,因为我一直在通过 Mamp 使用 MysqL,但在另一篇文章中我明白我应该这样做吗?
现在,在 Symfony 上,我尝试使用
创建数据库doctrine:database:create
An exception occurred in driver: Could not find driver
在另一篇文章之后,我检查了 PHPinfo()
并且我确实启用了 PDO MysqL。但它没有出现在我的 PHP.ini 中(当我去 Mamp->bin->PHP->PHP7.4.9->conf->PHP.ini 时)。我读过我应该看到 extension=PHP_MysqLi.so
和 PHP_pdo_pgsql.so
和 PHP_pdo_MysqL.so
我需要自己添加吗?
更新:PHP bin/console debug:config 准则的结果:
doctrine:
dbal:
default_connection: default
connections:
default:
driver: pdo_MysqL
server_version: '5.7'
charset: utf8mb4
default_table_options:
charset: utf8mb4
collate: utf8mb4_unicode_ci
url: '%env(resolve:DATABASE_URL)%'
host: localhost
port: null
user: root
password: null
logging: true
profiling: true
profiling_collect_backtrace: false
profiling_collect_schema_errors: true
options: { }
mapping_types: { }
slaves: { }
replicas: { }
shards: { }
types: { }
orm:
auto_generate_proxy_classes: true
default_entity_manager: default
entity_managers:
default:
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
auto_mapping: true
mappings:
App:
is_bundle: false
type: annotation
dir: '/Users/mathildedion/chamla 15.53.49/src/Entity'
prefix: App\Entity
alias: App
mapping: true
query_cache_driver:
type: null
Metadata_cache_driver:
type: null
result_cache_driver:
type: null
class_Metadata_factory_name: Doctrine\ORM\Mapping\ClassMetadataFactory
default_repository_class: Doctrine\ORM\EntityRepository
quote_strategy: doctrine.orm.quote_strategy.default
entity_listener_resolver: null
repository_factory: doctrine.orm.container_repository_factory
hydrators: { }
filters: { }
proxy_dir: '%kernel.cache_dir%/doctrine/orm/Proxies'
proxy_namespace: Proxies
resolve_target_entities: { }
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)