DDEV Prestashop 数据库连接

DDEV Prestashop database connection

我想用 DDEV 安装 Prestashop,但无法连接到数据库。

我尝试了 127.0.0.1:32775 和 localhost:32775,"db" 为 user/db/password 但我收到此错误:

Database Server is not found. Please verify the login, password and server fields (DbPDO)

数据库已启动并且 运行,通过命令行的连接正在运行:

mysql --host=127.0.0.1 --port=32775 --user=db --password=db --database=db

项目信息:

DDEV config.yaml - 更改为默认值:router_http(s)_port

APIVersion: v1.11.2
name: prestatest
type: php
docroot: ""
php_version: "7.2"
webserver_type: nginx-fpm
router_http_port: "880"
router_https_port: "8443"
xdebug_enabled: false
additional_hostnames: []
additional_fqdns: []
mariadb_version: "10.2"
nfs_mount_enabled: false
provider: default
use_dns_when_possible: true
timezone: ""

ddev describe 将显示数据库连接信息。

主机:db 用户:db 密码:db 数据库:db

大多数人忘记了主机名配置。