Suggestion for: Install Drupal CMS locally with DDEV

Created on 22 June 2025, about 2 months ago

After following the instructions for Drupal CMS' ddev local install, it's asking me for database info, and I can't figure out what it wants! Particularly the database name; the user/password is, apparently, either "db/db" or "root/root".

🐛 Bug report
Status

Active

Component

Correction/Clarification

Created by

🇺🇸United States ian_grant

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @ian_grant
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • 🇺🇸United States ian_grant

    I finally figured out that running this command:

    dev drush site:install --account-name=admin --account-pass=admin -y

    told Drupal about the database, letting me login. Maybe something like that should be in the instructions?

  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    For what I recall, the default database credentials used by DDEV are always the same, independently from the project. After ddev start, ddev describe will report the database credentials, which is helpful in the case the project uses different credentials.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    The database name, the database host, the database port, the credentials, and the database name are in the settings.ddev.php file, which contains lines like the following ones.

    $host = "db";
    $port = 3306;
    $driver = "mysql";
    
    $databases['default']['default']['database'] = "db";
    $databases['default']['default']['username'] = "db";
    $databases['default']['default']['password'] = "db";
    $databases['default']['default']['host'] = $host;
    $databases['default']['default']['port'] = $port;
    $databases['default']['default']['driver'] = $driver;

    I am not sure it is necessary to add that information in the documentation for Drupal 11. That should be placed in the DDEV documentation.

Production build 0.71.5 2024