我正在按照指南https://doc.ezplatform.com/en/latest/community_resources/installing-on-mac-os-and-windows/来(徒劳)本地运行eZ Platform(macOS v10.14.6)。
我用Homebrew来安装MySQL + PHP 7.3。
一切正常,直到运行 composer ezplatform-install 。安装程序从不会提示我输入文档中所述的任何参数。而且发生这种情况:
> @php bin/console ezplatform:install clean
Creating the database ezp if it does not exist, executing command doctrine:database:create --if-not-exists
The configured database 'ezp' does not exist or cannot be created (An error occurred when executing the "'doctrine:database:create --if-not-exists'" command.).
Please check the database configuration in 'app/config/parameters.yml'
Script @php bin/console ezplatform:install clean handling the ezplatform-install event returned with error code 4
我对这个残酷的shell反馈有几个问题:
配置方面,这是我的 .env 设置
# Doctrine DBAL
DATABASE_USER=user
DATABASE_PASSWORD=password
DATABASE_NAME=ezp
DATABASE_HOST=localhost
DATABASE_PORT=3306
DATABASE_PLATFORM=mysql
DATABASE_DRIVER=pdo_mysql
我还根据在该主题上发现的一些线程的建议,将server_version添加到 doctrine.yaml 。我的问题仍然存在...
# configure these for your database server
driver: pdo_mysql
server_version: 8.0.18
charset: '%database_charset%'
default_table_options:
charset: '%database_charset%'
collate: '%database_collation%'
url: '%env(resolve:DATABASE_URL)%'
答案 0 :(得分:0)
尝试删除数据库,然后让eZ Platforme创建它。
致谢。