#227 Stopping MySQL tuner when SELECT VERSION doesnt return any value. This indicates that user doent get enough privileges
This commit is contained in:
parent
e8e608b471
commit
b42b97f96f
1 changed files with 4 additions and 0 deletions
|
@ -945,6 +945,10 @@ sub arr2hash {
|
||||||
sub get_all_vars {
|
sub get_all_vars {
|
||||||
# We need to initiate at least one query so that our data is useable
|
# We need to initiate at least one query so that our data is useable
|
||||||
$dummyselect = select_one "SELECT VERSION()";
|
$dummyselect = select_one "SELECT VERSION()";
|
||||||
|
if (not defined($dummyselect) or $dummyselect== "") {
|
||||||
|
badprint "You probably doesn't get enough privileges for running MySQLTuner ..."
|
||||||
|
exit(256);
|
||||||
|
}
|
||||||
$dummyselect =~ s/(.*?)\-.*/$1/;
|
$dummyselect =~ s/(.*?)\-.*/$1/;
|
||||||
debugprint "VERSION: " . $dummyselect . "";
|
debugprint "VERSION: " . $dummyselect . "";
|
||||||
$result{'MySQL Client'}{'Version'} = $dummyselect;
|
$result{'MySQL Client'}{'Version'} = $dummyselect;
|
||||||
|
|
Loading…
Reference in a new issue