Update version command #428
This commit is contained in:
parent
66f2ee40be
commit
851cd817de
3 changed files with 9 additions and 6 deletions
|
@ -178,6 +178,10 @@ __Usage:__ Enable debugging information
|
||||||
|
|
||||||
perl mysqltuner.pl --debug
|
perl mysqltuner.pl --debug
|
||||||
|
|
||||||
|
__Usage:__ Update MySQLTuner and data files (password and cve) if needed
|
||||||
|
|
||||||
|
perl mysqltuner.pl --checkversion --updateversion
|
||||||
|
|
||||||
FAQ
|
FAQ
|
||||||
--
|
--
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ do
|
||||||
if [ -n "$1" -a "$1" != "$container_name" ]; then
|
if [ -n "$1" -a "$1" != "$container_name" ]; then
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
#set -x
|
shift
|
||||||
sudo rm -f /var/lib/mysql
|
sudo rm -f /var/lib/mysql
|
||||||
sudo ln -sf $container_datadir /var/lib/mysql
|
sudo ln -sf $container_datadir /var/lib/mysql
|
||||||
sudo chmod 777 /var/lib/mysql
|
sudo chmod 777 /var/lib/mysql
|
||||||
|
@ -21,5 +21,5 @@ do
|
||||||
#sudo docker logs $container_name > /tmp/mysqld.log
|
#sudo docker logs $container_name > /tmp/mysqld.log
|
||||||
ls -ls /var/lib | grep -E 'mysql$'
|
ls -ls /var/lib | grep -E 'mysql$'
|
||||||
#set +x
|
#set +x
|
||||||
perl mysqltuner.pl --verbose --host 127.0.0.1 --port $container_port
|
perl mysqltuner.pl $* --host 127.0.0.1 --port $container_port
|
||||||
done < "$input"
|
done < "$input"
|
||||||
|
|
|
@ -517,7 +517,7 @@ sub get_http_cli {
|
||||||
|
|
||||||
# Checks for updates to MySQLTuner
|
# Checks for updates to MySQLTuner
|
||||||
sub validate_tuner_version {
|
sub validate_tuner_version {
|
||||||
if ( $opt{'checkversion'} eq 0 and $opt{'updateversion'} eq 0 ) {
|
if ( $opt{'checkversion'} eq 0 ) {
|
||||||
print "\n" unless ( $opt{'silent'} or $opt{'json'} );
|
print "\n" unless ( $opt{'silent'} or $opt{'json'} );
|
||||||
infoprint "Skipped version check for MySQLTuner script";
|
infoprint "Skipped version check for MySQLTuner script";
|
||||||
return;
|
return;
|
||||||
|
@ -626,8 +626,8 @@ sub update_tuner_version {
|
||||||
else {
|
else {
|
||||||
badprint "Couldn't update MySQLTuner script";
|
badprint "Couldn't update MySQLTuner script";
|
||||||
}
|
}
|
||||||
|
infoprint "Stopping program: MySQLTuner has be updated.";
|
||||||
#exit 0;
|
exit 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub compare_tuner_version {
|
sub compare_tuner_version {
|
||||||
|
@ -2198,7 +2198,6 @@ sub check_storage_engines {
|
||||||
( $engine, $size, $count, $dsize, $isize ) =
|
( $engine, $size, $count, $dsize, $isize ) =
|
||||||
$line =~ /([a-zA-Z_]+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)/;
|
$line =~ /([a-zA-Z_]+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)/;
|
||||||
debugprint "Engine Found: $engine";
|
debugprint "Engine Found: $engine";
|
||||||
trim $engine;
|
|
||||||
next unless ( defined($engine) or trim($engine) eq '' );
|
next unless ( defined($engine) or trim($engine) eq '' );
|
||||||
$size = 0 unless ( defined($size) or trim($engine) eq '' );
|
$size = 0 unless ( defined($size) or trim($engine) eq '' );
|
||||||
$isize = 0 unless ( defined($isize) or trim($engine) eq '' );
|
$isize = 0 unless ( defined($isize) or trim($engine) eq '' );
|
||||||
|
|
Loading…
Reference in a new issue