Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • I ISPConfig 3
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 551
    • Issues 551
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 41
    • Merge requests 41
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • ISPConfig
  • ISPConfig 3
  • Issues
  • #6097

Closed
Open
Created Mar 11, 2021 by Thomas Basler@tbasler

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);
 		}
Assignee
Assign to
Time tracking