During the hostmaster install, I block in the wizard at the verify step:

Task starts processing
Running:php /var/hostmaster/drush/drush.php 'provision' 'verify' --task_i... (Expand)Running:php /var/hostmaster/drush/drush.php 'provision' 'verify' --task_id='7' --master_db='mysql://hostmaster:[CENSORED]@localhost' --platform='6' --publish_path='/var/hostmaster/drupal-5.x' --master_url='http://localhost' --drush_path='/var/hostmaster/drush/drush.php' --web_id='3' --web_host='localhost' --script_user='hostmaster' --web_group='www-data' --config_path='/var/hostmaster/config' --backup_path='/var/hostmaster/backups' --restart_cmd='sudo /usr/sbin/apache2ctl graceful' --root='/var/hostmaster/drupal-5.x' --backend
Initializing provision_drupal
Could not select the mysql database.
Removing task from hosting queue

Comments

anarcat’s picture

Title: Cannot verify first platform » provision assumes it has access to the mysql database
Project: Hostmaster (Aegir) » Provision

So it seems that the code assumes the mysql user has access to the mysql database:

    $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;
    }

Indeed, the hostmaster user doesn't have access to the mysql database:

mumia:~/drupal-5.x$ mysql -u hostmaster -p mysql
Enter password: 
ERROR 1044 (42000): Access denied for user 'hostmaster'@'localhost' to database 'mysql'

That's normal: the mysql db is restricted. We should test connectivity on the hostmaster db or some database we know works.

anarcat’s picture

Status: Active » Closed (works as designed)

Actually, i'm retarded. That user needs to be a superuser because it needs to be able to do GRANT and have access to all databases, so that check is proper.