键入php bin /控制台原则时遇到的问题:数据库:创建 返回错误 我在Windows 10上 使用Xampp VSCode编辑器
PS C:\ app \ xamp \ htdocs \ test> php bin /控制台make:migration 在AbstractMySQLDriver.php第106行中: 驱动程序发生异常:找不到驱动程序 在PDOConnection.php第31行中: 找不到驱动程序 在PDOConnection.php第27行中: 找不到驱动程序
在doctrine.yaml文件中: 教义: dbal: 驱动程序:“ pdo_mysql” server_version:“ 5.7” 字符集:utf8mb4 default_table_options: 字符集:utf8mb4 整理:utf8mb4_unicode_ci 网址:“%env(resolve:DATABASE_URL)%” driver_class:App \ DBAL \ Driver \ PDOMySql \ Driver
# IMPORTANT: You MUST configure your server version,
# either here or in the DATABASE_URL env var (see .env file)
#server_version: '5.7'
orm:
auto_generate_proxy_classes: true
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
auto_mapping: true
mappings:
App:
is_bundle: false
type: annotation
dir: '%kernel.project_dir%/src/Entity'
prefix: 'App\Entity'
alias: App
在.env文件中: DATABASE_URL = mysql:// root:@ 127.0.0.1:3306 / testbrain?serverVersion = 5.7
在此先感谢您的回答