Commit 3dded7b9 authored by Florian Schaal's avatar Florian Schaal

removed useless FLUSH PRIVILEGES

parent 7baf7391
...@@ -472,9 +472,6 @@ class installer extends installer_base ...@@ -472,9 +472,6 @@ class installer extends installer_base
$this->error('Unable to create user for powerdns database Error: '.$this->db->errorMessage); $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 //* load the powerdns databse dump
if($conf['mysql']['admin_password'] == '') { if($conf['mysql']['admin_password'] == '') {
caselog("mysql --default-character-set=".$conf['mysql']['charset']." -h '".$conf['mysql']['host']."' -u '".$conf['mysql']['admin_user']."' '".$conf['powerdns']['database']."' < '".ISPC_INSTALL_ROOT."/install/sql/powerdns.sql' &> /dev/null", caselog("mysql --default-character-set=".$conf['mysql']['charset']." -h '".$conf['mysql']['host']."' -u '".$conf['mysql']['admin_user']."' '".$conf['powerdns']['database']."' < '".ISPC_INSTALL_ROOT."/install/sql/powerdns.sql' &> /dev/null",
......
...@@ -263,9 +263,8 @@ class installer_base { ...@@ -263,9 +263,8 @@ class installer_base {
} }
// Delete ISPConfig user in the local database, in case that it exists // 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("DROP USER ?'@'? ", $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("DROP DATABASE IF EXISTS ?", $conf['mysql']['database']);
$this->db->query('FLUSH PRIVILEGES');
//* Create the ISPConfig database user in the local database //* Create the ISPConfig database user in the local database
$query = 'GRANT SELECT, INSERT, UPDATE, DELETE ON ?? TO ?@? IDENTIFIED BY ?'; $query = 'GRANT SELECT, INSERT, UPDATE, DELETE ON ?? TO ?@? IDENTIFIED BY ?';
...@@ -273,9 +272,6 @@ class installer_base { ...@@ -273,9 +272,6 @@ class installer_base {
$this->error('Unable to create database user: '.$conf['mysql']['ispconfig_user'].' Error: '.$this->db->errorMessage); $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 //* Set the database name in the DB library
$this->db->setDBName($conf['mysql']['database']); $this->db->setDBName($conf['mysql']['database']);
...@@ -655,10 +651,6 @@ class installer_base { ...@@ -655,10 +651,6 @@ class installer_base {
} }
} }
/*
* It is all done. Relod the rights...
*/
$this->dbmaster->query('FLUSH PRIVILEGES');
} }
} }
...@@ -1472,9 +1464,6 @@ class installer_base { ...@@ -1472,9 +1464,6 @@ class installer_base {
$this->error('Unable to create user for powerdns database Error: '.$this->db->errorMessage); $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 //* load the powerdns databse dump
if($conf['mysql']['admin_password'] == '') { if($conf['mysql']['admin_password'] == '') {
caselog("mysql --default-character-set=".$conf['mysql']['charset']." -h '".$conf['mysql']['host']."' -u '".$conf['mysql']['admin_user']."' '".$conf['powerdns']['database']."' < '".ISPC_INSTALL_ROOT."/install/sql/powerdns.sql' &> /dev/null", caselog("mysql --default-character-set=".$conf['mysql']['charset']." -h '".$conf['mysql']['host']."' -u '".$conf['mysql']['admin_user']."' '".$conf['powerdns']['database']."' < '".ISPC_INSTALL_ROOT."/install/sql/powerdns.sql' &> /dev/null",
......
...@@ -326,9 +326,9 @@ if($reconfigure_services_answer == 'yes' || $reconfigure_services_answer == 'sel ...@@ -326,9 +326,9 @@ if($reconfigure_services_answer == 'yes' || $reconfigure_services_answer == 'sel
$inst->configure_postfix('dont-create-certs'); $inst->configure_postfix('dont-create-certs');
if($conf['dovecot']['installed'] == true) { if($conf['dovecot']['installed'] == true) {
//* Configure dovecot //* Configure dovecot
swriteln('Configuring Dovecot'); swriteln('Configuring Dovecot');
$inst->configure_dovecot(); $inst->configure_dovecot();
} elseif ($conf['courier']['installed'] == true) { } elseif ($conf['courier']['installed'] == true) {
//** Configure saslauthd //** Configure saslauthd
swriteln('Configuring SASL'); swriteln('Configuring SASL');
......
...@@ -228,7 +228,6 @@ class mysql_clientdb_plugin { ...@@ -228,7 +228,6 @@ class mysql_clientdb_plugin {
} }
$link->query('FLUSH PRIVILEGES;');
$link->close(); $link->close();
} }
} }
...@@ -433,7 +432,6 @@ class mysql_clientdb_plugin { ...@@ -433,7 +432,6 @@ class mysql_clientdb_plugin {
} }
} }
// Database is not active, so stop processing here // Database is not active, so stop processing here
$link->query('FLUSH PRIVILEGES;');
$link->close(); $link->close();
return; return;
} }
...@@ -570,8 +568,6 @@ class mysql_clientdb_plugin { ...@@ -570,8 +568,6 @@ class mysql_clientdb_plugin {
} }
} }
$link->query('FLUSH PRIVILEGES;');
$link->close(); $link->close();
} }
...@@ -621,7 +617,6 @@ class mysql_clientdb_plugin { ...@@ -621,7 +617,6 @@ class mysql_clientdb_plugin {
$app->log('Error while dropping MySQL database: '.$data['old']['database_name'].' '.$link->error, LOGLEVEL_WARNING); $app->log('Error while dropping MySQL database: '.$data['old']['database_name'].' '.$link->error, LOGLEVEL_WARNING);
} }
$link->query('FLUSH PRIVILEGES;');
$link->close(); $link->close();
} }
...@@ -685,7 +680,6 @@ class mysql_clientdb_plugin { ...@@ -685,7 +680,6 @@ class mysql_clientdb_plugin {
} }
} }
$link->query('FLUSH PRIVILEGES;');
$link->close(); $link->close();
} }
...@@ -721,7 +715,6 @@ class mysql_clientdb_plugin { ...@@ -721,7 +715,6 @@ class mysql_clientdb_plugin {
} }
} }
$link->query('FLUSH PRIVILEGES;');
$link->close(); $link->close();
} }
......
...@@ -267,7 +267,6 @@ class software_update_plugin { ...@@ -267,7 +267,6 @@ class software_update_plugin {
$app->log('Unable to create database user'.$db_config['database_user'].' '.mysqli_error($link), LOGLEVEL_ERROR); $app->log('Unable to create database user'.$db_config['database_user'].' '.mysqli_error($link), LOGLEVEL_ERROR);
} }
mysqli_query($link, "FLUSH PRIVILEGES;");
mysqli_close($link); mysqli_close($link);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment