首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >本地安装eZ平台无法连接到MySQL数据库

本地安装eZ平台无法连接到MySQL数据库
EN

Stack Overflow用户
提问于 2019-10-16 21:22:58
回答 1查看 242关注 0票数 1

我试图(徒劳无功)在本地运行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之前,一切都进行得很顺利。安装程序从不提示我输入文档中所述的任何参数。此外,这种情况还会发生:

代码语言:javascript
复制
> @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文件

  • 中,我已经启动并运行了MySQL,并且存在一个“ezp”数据库。

以下是我的.env设置

代码语言:javascript
复制
# 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,这是我在这个主题上找到的几个线程上推荐的。我的问题一直存在..。

代码语言:javascript
复制
# 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)%'
EN

回答 1

Stack Overflow用户

发布于 2020-09-26 01:06:54

尝试删除数据库并让eZ Platforme创建它。

致以问候。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/58421885

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档