From 3dded7b96c519efe9a5015f09712462164d1888f Mon Sep 17 00:00:00 2001 From: Florian Schaal <florian@schaal-24.de> Date: Mon, 15 Feb 2016 02:39:24 -0500 Subject: [PATCH] removed useless FLUSH PRIVILEGES --- install/lib/installer_base.lib.php | 15 ++------------- 1 files changed, 2 insertions(+), 13 deletions(-) diff --git a/install/lib/installer_base.lib.php b/install/lib/installer_base.lib.php index f2b7041..e7a664d 100644 --- a/install/lib/installer_base.lib.php +++ b/install/lib/installer_base.lib.php @@ -263,18 +263,14 @@ } // Delete ISPConfig user in the local database, in case that it exists - $this->db->query("DELETE FROM mysql.user WHERE User = ? AND Host = ?", $conf['mysql']['ispconfig_user'], $from_host); - $this->db->query("DELETE FROM mysql.db WHERE Db = ? AND Host = ?", $conf['mysql']['database'], $from_host); - $this->db->query('FLUSH PRIVILEGES'); + $this->db->query("DROP USER ?'@'? ", $conf['mysql']['ispconfig_user'], $from_host); + $this->db->query("DROP DATABASE IF EXISTS ?", $conf['mysql']['database']); //* Create the ISPConfig database user in the local database $query = 'GRANT SELECT, INSERT, UPDATE, DELETE ON ?? TO ?@? IDENTIFIED BY ?'; if(!$this->db->query($query, $conf['mysql']['database'] . ".*", $conf['mysql']['ispconfig_user'], $from_host, $conf['mysql']['ispconfig_password'])) { $this->error('Unable to create database user: '.$conf['mysql']['ispconfig_user'].' Error: '.$this->db->errorMessage); } - - //* Reload database privelages - $this->db->query('FLUSH PRIVILEGES;'); //* Set the database name in the DB library $this->db->setDBName($conf['mysql']['database']); @@ -655,10 +651,6 @@ } } - /* - * It is all done. Relod the rights... - */ - $this->dbmaster->query('FLUSH PRIVILEGES'); } } @@ -1471,9 +1463,6 @@ if(!$this->db->query($query, $conf['powerdns']['database'] . '.*', $conf['mysql']['ispconfig_user'])) { $this->error('Unable to create user for powerdns database Error: '.$this->db->errorMessage); } - - //* Reload database privelages - $this->db->query('FLUSH PRIVILEGES'); //* load the powerdns databse dump if($conf['mysql']['admin_password'] == '') { -- Gitblit v1.9.1