Johnson's picture

After install of turnkey-drupal7-13.0-wheezy-amd64-vmdk.zip (Version 13 stable) on a Windows7 64-bit machine, going to 10.0.0.5 in browser shows

Error
The website encountered an unexpected error. Please try again later.
Error message
PDOException: SQLSTATE[28000] [1045] Access denied for user 'drupal7'@'localhost'
(using password: YES) in lock_may_be_available() (line 167 of /var/www/drupal7/includes/lock.inc).

 

When VirtualBox Linux is shut down, this is shown: "Stoppng MySQL database server FAILED"

PHPMyAdmin shows in red: "Connection for controluser as defined in your configuration failed."

 

Help please.

Forum: 
Tags: 
Johnson's picture

For some reason, your script to create the drupal7 database does not put the same password in the settings.php file and the MySQL database.

Here's how I fixed this:

1) Webmin -> Text Editor -> open file /var/www/drupal7/sites/default/settings.php

2) Find section like this:

$databases = array (
  'default' =>
  array (
    'default' =>
    array (
      'database' => 'drupal7',
      'username' => 'drupal7',
      'password' => '9d69c5yter76a85034f4e272b289db',
      'host' => 'localhost',
      'port' => '',
      'driver' => 'mysql',
      'prefix' => '',
    ),

3) Copy password shown above, go to Webmin -> MySQL Database Server -> User Permissions

4) Selected user "drupal7" and edit to change password to one shown above

Solved.

Jeremy Davis's picture

But there is obviously something not quite right in your deployment... This should not be an issue (i.e. the script should work as intended). The fact that it doesn't would raise some concerns for me. I have personally used the Drupal7 appliance numerous times on numerous hardware (as VBox, KVM and OVZ VMs) and haven't ever encountered this issue... First thing I'd do is check the image for corruption (ideally use gpg key to check integrity, however on Windows using the hashes are probably easier).

Liraz Siri's picture

That's right, if settings.php and the mysql password were out of sync then Drupal should never work. Something's up with that specific deployment that probably doesn't have a lot to do with the generic integration.

Jeremy Davis's picture

I just downloaded this to double (triple) check that there is nothing wrong with this appliance and I can confirm that it works as expected. I tested both the OVZ container on my Proxmox server, then installed to VirtualBox on a Win host for good measure... Both worked as expected. Drupal7 works fine OOTB and I can log in with admin account and password that I set on first boot.

Also considering that you 2 guys are the only ones to report this issue despite the fact that this appliance has been downloaded tens of thousands of times it seems unlikely that there is anything fundamentally wrong with it.

My guess is a bad download (minor corruption). Did you check the integrity of your download? (Don't just download again - actually check the integrity of the download; downloading again proves nothing...)

Jeremy Davis's picture

It could be caused by many different things but when the appliance is working as it should this should not happen. Perhaps try running 'turnkey-init' and cross your fingers? If it still doesn't work my next guess is that the download is slightly corrupt...

Add new comment