? cleaner_error_reporting.patch
? silence.patch
? whee.patch
Index: db_server/install.provision.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/provision/db_server/install.provision.inc,v
retrieving revision 1.4
diff -u -u -r1.4 install.provision.inc
--- db_server/install.provision.inc	6 Apr 2009 17:45:54 -0000	1.4
+++ db_server/install.provision.inc	29 Apr 2009 19:35:31 -0000
@@ -11,7 +11,14 @@
   $db_name = drush_set_option('db_name', _provision_mysql_suggest_db_name($url), 'site');
   $db_user = drush_set_option('db_user', $db_name, 'site');
 
-  _provision_mysql_new_site_db($db_name, $db_user, $db_passwd, $db_host);
+  // fetch the webserver name to create a GRANT specific to this server
+  $db_client = drush_get_option('web_host');
+
+  // check if we need to resolve the hostname for the grant to work
+  if (drush_get_option('db_resolve_dns')) {
+    $db_client = gethostbyname($db_client);
+  }
+  _provision_mysql_new_site_db($db_name, $db_user, $db_passwd, $db_client);
 }
 
 function provision_mysql_pre_provision_install_rollback($url = NULL) {
Index: db_server/provision_mysql.drush.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/provision/db_server/provision_mysql.drush.inc,v
retrieving revision 1.8
diff -u -u -r1.8 provision_mysql.drush.inc
--- db_server/provision_mysql.drush.inc	6 Apr 2009 17:45:54 -0000	1.8
+++ db_server/provision_mysql.drush.inc	29 Apr 2009 19:35:31 -0000
@@ -39,7 +39,7 @@
 /**
  * Generate a new mysql database and user account for the specified credentials
  */
-function _provision_mysql_new_site_db($db_name, $db_user, $db_passwd, $db_host) {
+function _provision_mysql_new_site_db($db_name, $db_user, $db_passwd, $db_client) {
   if (!_provision_mysql_create_database($db_name) ||
       !_provision_mysql_database_exists($db_name) ) {
    drush_set_error('PROVISION_CREATE_DB_FAILED');
@@ -47,8 +47,7 @@
    return FALSE;
   }
   
-  if (!_provision_mysql_grant($db_name, $db_user, $db_passwd)
-      || !_provision_mysql_grant($db_name, $db_user, $db_passwd, 'localhost')) {
+  if (!_provision_mysql_grant($db_name, $db_user, $db_passwd, $db_client)) {
     drush_log("Could not GRANT user access.", 'warning');
   }
   _provision_mysql_flush_privileges();
@@ -120,6 +119,7 @@
 
 function _provision_mysql_grant($name, $username, $password, $host = '') {
   $host = ($host) ? $host : '%';
+  drush_log("GRANT ALL PRIVILEGES ON `%s`.* TO `%s`@`%s` IDENTIFIED BY '%s', $name, $username, $host, $password");
   return provision_db_query("GRANT ALL PRIVILEGES ON `%s`.* TO `%s`@`%s` IDENTIFIED BY '%s'", $name, $username, $host, $password);
 }
 
