Docker4drupal: Starting from scratch, docker4drupal complains about existing drupal installation

Created on 8 Feb 2018  Â·  4Comments  Â·  Source: wodby/docker4drupal

Hi, The latest docker4drupal prompts me to install page but when I follow the instruction for drupal installation, it says drupal is already installed

Here are the steps that I took:

  • git clone https://github.com/wodby/docker4drupal wodby
  • visited http://drupal.docker.localhost:8000/ and followed the instructions for installing drupal, then I get the following message!

Drupal already installed
To start over, you must empty your existing database and copy default.settings.php over settings.php.
To upgrade an existing installation, proceed to the update script.
View your existing site.

then when I visit the "existing site" I get the following error

The website encountered an unexpected error. Please try again later.

This was not the case with the previous releases.

All the containers are running

CONTAINER ID        IMAGE                             COMMAND                  CREATED             STATUS              PORTS                  NAMES
ef4d04eac313        wodby/drupal-nginx:8-1.13-3.0.2   "/docker-entrypoint.…"   10 minutes ago      Up 10 minutes       80/tcp                 wodby_nginx_1
531382563ba8        wodby/drupal:8-7.1-3.3.2          "/docker-entrypoint.…"   10 minutes ago      Up 10 minutes       9000/tcp               wodby_php_1
d1dfbc4c3184        wodby/mariadb:10.2-3.0.2          "/docker-entrypoint.…"   10 minutes ago      Up 10 minutes       3306/tcp               wodby_mariadb_1
fceba744e3db        mailhog/mailhog                   "MailHog"                10 minutes ago      Up 10 minutes       1025/tcp, 8025/tcp     wodby_mailhog_1
3eda47cdb307        portainer/portainer               "/portainer --no-aut…"   10 minutes ago      Up 10 minutes       9000/tcp               wodby_portainer_1
d57168883176        traefik                           "/traefik -c /dev/nu…"   10 minutes ago      Up 10 minutes       0.0.0.0:8000->80/tcp   wodby_traefik_1

Codebase

Built-in vanilla Drupal

Host OS

macOS Sierra

Docker compose file

I just cloned the file from your repository, no changes

Most helpful comment

somehow the username and password was messed up! If you ever encounter the same problem, check your username and password for the database.

All 4 comments

After looking at the log files for mariadb I see that the user doesn't have access to the database

[Warning] Access denied for user 'drupal'@'172.18.0.6' (using password: YES)

I hope this additional piece of information could help.

somehow the username and password was messed up! If you ever encounter the same problem, check your username and password for the database.

I confirmed @AminSarafraz solution, in the database step, the password is empty (cleared by the browser ?).

All you have to do is type it (drupal) and voila !

I still see this on fresh setup, with no modifications.
2020-03-12 15:03:10 18 [Warning] Access denied for user 'drupal'@'172.18.0.2' (using password: NO)

settings file of fresh install

$settings['config_sync_directory'] = '../config/sync';
$databases['default']['default'] = [
    'host' => 'mariadb',
    'database' => 'drupal',
    'username' => 'drupal',
    'password' => 'drupal',
    'driver' => 'mysql',
    'prefix' => '',
];

$config_directories['sync'] = '/mnt/files/config/sync_dir';
$settings['trusted_host_patterns'] = array(
    '\.localhost$', '\.local$', '\.loc$'
);$databases['default']['default'] = array (
  'database' => 'drupal',
  'username' => 'drupal',
  'password' => '',
  'prefix' => '',
  'host' => 'mariadb',
  'port' => '3306',
  'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
  'driver' => 'mysql',
);

after changing the last 'password' => '', to 'password' => 'drupal', it works.

I am 100% sure, that it was drupal/drupal pre-written during install.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

arrubiu picture arrubiu  Â·  4Comments

featherbelly picture featherbelly  Â·  5Comments

2dareis2do picture 2dareis2do  Â·  11Comments

quietone1 picture quietone1  Â·  10Comments

ChristianNally picture ChristianNally  Â·  8Comments