Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ISPConfig
ISPConfig 3
Commits
3dded7b9
Commit
3dded7b9
authored
Feb 15, 2016
by
Florian Schaal
Browse files
removed useless FLUSH PRIVILEGES
parent
7baf7391
Changes
5
Hide whitespace changes
Inline
Side-by-side
install/dist/lib/gentoo.lib.php
View file @
3dded7b9
...
...
@@ -472,9 +472,6 @@ class installer extends installer_base
$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'
]
==
''
)
{
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"
,
...
...
install/lib/installer_base.lib.php
View file @
3dded7b9
...
...
@@ -263,9 +263,8 @@ class installer_base {
}
// 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 ?'
;
...
...
@@ -273,9 +272,6 @@ class installer_base {
$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 @@ class installer_base {
}
}
/*
* It is all done. Relod the rights...
*/
$this
->
dbmaster
->
query
(
'FLUSH PRIVILEGES'
);
}
}
...
...
@@ -1472,9 +1464,6 @@ class installer_base {
$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'
]
==
''
)
{
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"
,
...
...
install/update.php
View file @
3dded7b9
...
...
@@ -326,9 +326,9 @@ if($reconfigure_services_answer == 'yes' || $reconfigure_services_answer == 'sel
$inst
->
configure_postfix
(
'dont-create-certs'
);
if
(
$conf
[
'dovecot'
][
'installed'
]
==
true
)
{
//* Configure dovecot
swriteln
(
'Configuring Dovecot'
);
$inst
->
configure_dovecot
();
//* Configure dovecot
swriteln
(
'Configuring Dovecot'
);
$inst
->
configure_dovecot
();
}
elseif
(
$conf
[
'courier'
][
'installed'
]
==
true
)
{
//** Configure saslauthd
swriteln
(
'Configuring SASL'
);
...
...
server/plugins-available/mysql_clientdb_plugin.inc.php
View file @
3dded7b9
...
...
@@ -228,7 +228,6 @@ class mysql_clientdb_plugin {
}
$link
->
query
(
'FLUSH PRIVILEGES;'
);
$link
->
close
();
}
}
...
...
@@ -433,7 +432,6 @@ class mysql_clientdb_plugin {
}
}
// Database is not active, so stop processing here
$link
->
query
(
'FLUSH PRIVILEGES;'
);
$link
->
close
();
return
;
}
...
...
@@ -570,8 +568,6 @@ class mysql_clientdb_plugin {
}
}
$link
->
query
(
'FLUSH PRIVILEGES;'
);
$link
->
close
();
}
...
...
@@ -621,7 +617,6 @@ class mysql_clientdb_plugin {
$app
->
log
(
'Error while dropping MySQL database: '
.
$data
[
'old'
][
'database_name'
]
.
' '
.
$link
->
error
,
LOGLEVEL_WARNING
);
}
$link
->
query
(
'FLUSH PRIVILEGES;'
);
$link
->
close
();
}
...
...
@@ -685,7 +680,6 @@ class mysql_clientdb_plugin {
}
}
$link
->
query
(
'FLUSH PRIVILEGES;'
);
$link
->
close
();
}
...
...
@@ -721,7 +715,6 @@ class mysql_clientdb_plugin {
}
}
$link
->
query
(
'FLUSH PRIVILEGES;'
);
$link
->
close
();
}
...
...
server/plugins-available/software_update_plugin.inc.php
View file @
3dded7b9
...
...
@@ -267,7 +267,6 @@ class software_update_plugin {
$app
->
log
(
'Unable to create database user'
.
$db_config
[
'database_user'
]
.
' '
.
mysqli_error
(
$link
),
LOGLEVEL_ERROR
);
}
mysqli_query
(
$link
,
"FLUSH PRIVILEGES;"
);
mysqli_close
(
$link
);
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment