Error when calling update.php and PowerDNS is configured
I tried to upgrade an ispconfig multi server config from 3.2.2. to 3.2.3 and got the following error message (or lets say, part of a message):
Do you want to rename these conf-custom templates now so the default templates are used? (yes,no) [no]:
Configuring PowerDNS
ERROR: Unable to create user for powerdns database Error:
Yes, no message was shown... after some time looking at the code and trying different things I compared the code from installer_base.lib.php
with gentoo.lib.php
which seems to be more up to date.
I applied the following change to the installer_base.lib.php
file and everything worked perfectly:
diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php
index 335bfa5b..6da2db71 100644
--- a/install/lib/installer_base.lib.php
+++ b/install/lib/installer_base.lib.php
@@ -2036,8 +2036,8 @@ class installer_base {
}
//* Create the ISPConfig database user in the local database
- $query = "GRANT ALL ON ?? TO ?@'localhost'";
- if(!$this->db->query($query, $conf['powerdns']['database'] . '.*', $conf['mysql']['ispconfig_user'])) {
+ $query = 'GRANT ALL ON ??.* TO ?@?';
+ if(!$this->db->query($query, $conf['powerdns']['database'], $conf['mysql']['ispconfig_user'], 'localhost')) {
$this->error('Unable to create user for powerdns database Error: '.$this->db->errorMessage);
}