我试图(徒劳无功)在本地运行eZ平台(macOS v10.14.6),遵循指南@ https://doc.ezplatform.com/en/latest/community_resources/installing-on-mac-os-and-windows/。
我使用Homebrew来安装MySQL +PHP7.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我对这个残酷的外壳反馈有几个问题:
没有任何app/config/parameters.yml,配置驻留在一个.env文件
以下是我的.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我还向doctrine.yaml添加了server_version,这是我在这个主题上找到的几个线程上推荐的。我的问题一直存在..。
# 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)%'发布于 2020-09-26 01:06:54
尝试删除数据库并让eZ Platforme创建它。
致以问候。
https://stackoverflow.com/questions/58421885
复制相似问题