Version: Drupal 8
DB: MySql

I followed the instructions to add a database from here: https://www.drupal.org/documentation/install/create-database

I am at the stage of running install.php. The following are the MySql options:

  • Database type = MySQL, MariaDB, Percona Server, or equivalent
  • Database name = du_drupal_8
  • Database username = drupal
  • Database password = a_password

After hitting "Save and Continue" the following message comes up:

Failed to connect to your database server. The server reports the following message: SQLSTATE[42000] [1044] Access denied for user 'drupal'@'localhost' to database 'du_drupal_8'.

Considerations:

  1. I can log into MySql cli using the username and password above, then.
  2. The "show databases;" command lists the database.
  3. The command "use dp_drupal_8;" returns "Database changed".
  4. This username/password is in use for a drupal 7 database and works fine.

Any help solving this problem would be appreciated.

Comments

ibanja’s picture

It turns out I have a simple typo. The simple solution was I had a typo in the DB name. "du_drupal_8" should have been "dp_drupal_8".

I would like to delete this post, as it is not helpful to the community, but I don't see a delete button. Sorry for the trouble but, could an administrator please delete this, or if there is a way for me to do it, I would appreciate being told how.

Thanks