diff --git a/README.md b/README.md index 7087d44..7a18e95 100644 --- a/README.md +++ b/README.md @@ -178,6 +178,10 @@ __Usage:__ Enable debugging information perl mysqltuner.pl --debug +__Usage:__ Update MySQLTuner and data files (password and cve) if needed + + perl mysqltuner.pl --checkversion --updateversion + FAQ -- diff --git a/build/runMT.sh b/build/runMT.sh index 2bf658d..ae9f796 100644 --- a/build/runMT.sh +++ b/build/runMT.sh @@ -13,7 +13,7 @@ do if [ -n "$1" -a "$1" != "$container_name" ]; then continue fi - #set -x + shift sudo rm -f /var/lib/mysql sudo ln -sf $container_datadir /var/lib/mysql sudo chmod 777 /var/lib/mysql @@ -21,5 +21,5 @@ do #sudo docker logs $container_name > /tmp/mysqld.log ls -ls /var/lib | grep -E 'mysql$' #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" diff --git a/mysqltuner.pl b/mysqltuner.pl index 8aad0fe..e9549d7 100755 --- a/mysqltuner.pl +++ b/mysqltuner.pl @@ -517,7 +517,7 @@ sub get_http_cli { # Checks for updates to MySQLTuner 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'} ); infoprint "Skipped version check for MySQLTuner script"; return; @@ -626,8 +626,8 @@ sub update_tuner_version { else { badprint "Couldn't update MySQLTuner script"; } - - #exit 0; + infoprint "Stopping program: MySQLTuner has be updated."; + exit 0; } sub compare_tuner_version { @@ -2198,7 +2198,6 @@ sub check_storage_engines { ( $engine, $size, $count, $dsize, $isize ) = $line =~ /([a-zA-Z_]+)\s+(\d+)\s+(\d+)\s+(\d+)\s+(\d+)/; debugprint "Engine Found: $engine"; - trim $engine; next unless ( defined($engine) or trim($engine) eq '' ); $size = 0 unless ( defined($size) or trim($engine) eq '' ); $isize = 0 unless ( defined($isize) or trim($engine) eq '' );