Documentation location/URL

https://new.drupal.org/docs/drupal-cms/get-started/install-drupal-cms/in...

Problem/Motivation

Following the instructions in Install Drupal CMS locally with DDEV to install Drupal CMS, I am asked for the database information, and I can't figure out what it wants, particularly for the database name. The username/password is, apparently, either "db/db" or "root/root".

Proposed resolution

Document the credentials which should be used.

Comments

ian_grant created an issue. See original summary.

avpaderno’s picture

Title: Suggestion for: Install Drupal CMS locally with DDEV » Make clearer what the database credentials are in "Install Drupal CMS locally with DDEV"
Category: Bug report » Task
Issue tags: -database initialization, -Drupal CMS
avpaderno’s picture

Issue summary: View changes
ian_grant’s picture

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?

avpaderno’s picture

Issue summary: View changes
avpaderno’s picture

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.

avpaderno’s picture

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 CMS. That should be placed in the DDEV documentation.

eojthebrave’s picture

Status: Active » Closed (works as designed)

If you follow the instructions documented on this page https://new.drupal.org/docs/drupal-cms/get-started/install-drupal-cms/in... you shouldn't need to do anything with db credentials. DDEV should take care of it automatically. I just tested again to verify, and it was working as expected. If you're being prompted for db credentials it means something wasn't working correctly during the install, or that you maybe followed a different set of instructions than those outlined.

And, as @avpaderno points out this should be (and is https://docs.ddev.com/en/stable/users/usage/database-management/, and https://docs.ddev.com/en/stable/users/usage/cms-settings/#cms-specific-h...) part of the DDEV documentation.

Thanks for the suggestion. Though I'm not sure it's necessary to update the page and we can instead close this issue. Though feel free to re-open if you disagree and can provide more insight into why the change is needed.

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.