diff --git a/modules/setup/library/Setup/Utils/DbTool.php b/modules/setup/library/Setup/Utils/DbTool.php
index 37d0673b1..a368bfa1a 100644
--- a/modules/setup/library/Setup/Utils/DbTool.php
+++ b/modules/setup/library/Setup/Utils/DbTool.php
@@ -486,7 +486,7 @@ class DbTool
                 'GRANT %%s ON %s.%%s TO %s@%s',
                 $this->quoteIdentifier($this->config['dbname']),
                 $this->quoteIdentifier($username),
-                $this->quoteIdentifier($host)
+                str_replace('%', '%%', $this->quoteIdentifier($host))
             );
 
             $dbPrivileges = array();