Hi all,

Using the head version of install.sh based on the link to cvs on the wiki install page (http://groups.drupal.org/node/25495). I am having problems running the verify platform task after hostmaster install and get the following error (screenshot attached) "Could not select mysql database".

I have my sites/aegir.loc/settings.php file setup with db user "aegir" and the database server is localhost with db user "aegir_root". Aegir is obviously struggling with database login does anyone know how I can work my way through this issue?

What more info do I need to provide etc?

TIA,

JamieT

CommentFileSizeAuthor
Screenshot.png31.21 KBjamiet

Comments

Anonymous’s picture

Actually this error occurs when the mysql superuser is not able to use the 'mysql' database after making a connection.

From .drush/provision/db_server/provision.mysql.inc

    $success = @mysql_select_db('mysql', $connection);
    if ($success) {
      _provision_db_connection($connection);
    }
    else {
      drush_set_error('PROVISION_MASTER_DB_FAILED', dt('Could not select the mysql database.'), 'error');
      return FALSE;
    }

So it is more likely that your mysql superuser does not have the correct privileges.

Double-check that the 'aegir_root' superuser has been given a grant like this:

'GRANT ALL PRIVILEGES ON *.* TO 'aegir_root'@'localhost' IDENTIFIED BY 'yourpassword' WITH GRANT OPTION;'

Confirm that the credentials in the hosting_db_server table in the aegir database match these credentials (SELECT * FROM hosting_db_server)

Then try and re-run the task.

jamiet’s picture

Thanks for the response mig5. I found the same piece of code via a few greps after the debug output. Based on your comment on the the other issue I removed the settings.php file in sites/default.

I checked mysql privileges using phpmyadmin and the aegir_root user has the privileges you refer to and checking the hosting_db_server table confirms the credentials match the mysql privileges tables. Can you think of any other debugging I can do?

TIA,

JamieT

jamiet’s picture

Status: Active » Fixed

OK - once I sussed the issue with su -s /bin/bash aegir I decided I should run the hosting setup command again. This didn't seem to do anything more (but I remembered I ran it the first time as sudo -u aegir). I then run the provision verify command again and it didn't error at all! :).

Checking the task on the web frontend and it is now successful. I will hope over to the other issue with some explanations and hope that helps the OP.

Thanks for your help,

JamieT

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

socialnicheguru’s picture

Status: Closed (fixed) » Active

I have the same issue but can't seem to figure out how to get rid of it.

In addition, I have:
undefined index: base_url
Undefined index: db_url

I had to do part of my install manually so I did not have aegir.example.com created as a subdirectory of default which I think happens in the script.

Any suggestions would be greatly appreciated.

adrian’s picture

Status: Active » Closed (fixed)

#5 - this is not the same error as the initial ticket, and those are notices, not even warnings.