Search code examples
prestashopprestashop-1.7ddev

DDEV Prestashop database connection


I want to install a Prestashop with DDEV, but I can't connect to database.

I tried 127.0.0.1:32775 and localhost:32775, with "db" as user/db/password But I get this error:

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

Database is up and running, connection via commandline is working:

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

Project information:

  • PrestaShop 1.7.6.2 Installer (I first tried github/composer installation - error, then zip download with wizard - same error)
  • ddev version v1.11.2
  • DDEV project type: php
  • Host: MacOS 10.15.1

DDEV config.yaml - changes to default: 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: ""

Solution

  • ddev describe will show you the db connection information.

    Host: db User: db Password: db Database: db

    Mostly people forget the hostname configuration.