Please add support for --protocol=TCP #474
This commit is contained in:
parent
e437c1a3fc
commit
c5cc4096a2
1 changed files with 12 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/env perl
|
#!/usr/bin/env perl
|
||||||
# mysqltuner.pl - Version 1.9.3
|
# mysqltuner.pl - Version 1.9.4
|
||||||
# High Performance MySQL Tuning Script
|
# High Performance MySQL Tuning Script
|
||||||
# Copyright (C) 2006-2022 Major Hayden - major@mhtx.net
|
# Copyright (C) 2006-2022 Major Hayden - major@mhtx.net
|
||||||
#
|
#
|
||||||
|
@ -56,7 +56,7 @@ use Cwd 'abs_path';
|
||||||
#use Env;
|
#use Env;
|
||||||
|
|
||||||
# Set up a few variables for use in the script
|
# Set up a few variables for use in the script
|
||||||
my $tunerversion = "1.9.3";
|
my $tunerversion = "1.9.4";
|
||||||
my ( @adjvars, @generalrec );
|
my ( @adjvars, @generalrec );
|
||||||
|
|
||||||
# Set defaults
|
# Set defaults
|
||||||
|
@ -107,6 +107,7 @@ my %opt = (
|
||||||
"reportfile" => 0,
|
"reportfile" => 0,
|
||||||
"verbose" => 0,
|
"verbose" => 0,
|
||||||
"defaults-file" => '',
|
"defaults-file" => '',
|
||||||
|
"protocol" => '',
|
||||||
);
|
);
|
||||||
|
|
||||||
# Gather the options from the command line
|
# Gather the options from the command line
|
||||||
|
@ -137,7 +138,7 @@ GetOptions(
|
||||||
'sysstat', 'nosysstat',
|
'sysstat', 'nosysstat',
|
||||||
'pfstat', 'nopfstat',
|
'pfstat', 'nopfstat',
|
||||||
'idxstat', 'noidxstat',
|
'idxstat', 'noidxstat',
|
||||||
'server-log=s',
|
'server-log=s', 'protocol=s',
|
||||||
)
|
)
|
||||||
or pod2usage(
|
or pod2usage(
|
||||||
-exitval => 1,
|
-exitval => 1,
|
||||||
|
@ -741,6 +742,10 @@ sub mysql_setup {
|
||||||
$remotestring = " -S $opt{socket} -P $opt{port}";
|
$remotestring = " -S $opt{socket} -P $opt{port}";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( $opt{protocol} ne '' ){
|
||||||
|
$remotestring = " --protocol=$opt{protocol}";
|
||||||
|
}
|
||||||
|
|
||||||
# Are we being asked to connect to a remote server?
|
# Are we being asked to connect to a remote server?
|
||||||
if ( $opt{host} ne 0 ) {
|
if ( $opt{host} ne 0 ) {
|
||||||
chomp( $opt{host} );
|
chomp( $opt{host} );
|
||||||
|
@ -2188,8 +2193,8 @@ sub validate_mysql_version {
|
||||||
badprint "Your MySQL version "
|
badprint "Your MySQL version "
|
||||||
. $myvar{'version'}
|
. $myvar{'version'}
|
||||||
. " is EOL software! Upgrade soon!";
|
. " is EOL software! Upgrade soon!";
|
||||||
push ( @recommendations, "You are using n unsupported version for production environments");
|
push ( @generalrec, "You are using n unsupported version for production environments");
|
||||||
push ( @recommendations, "Upgrade as soon as possible to a supported version !");
|
push ( @generalrec, "Upgrade as soon as possible to a supported version !");
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6850,7 +6855,7 @@ __END__
|
||||||
|
|
||||||
=head1 NAME
|
=head1 NAME
|
||||||
|
|
||||||
MySQLTuner 1.9.3 - MySQL High Performance Tuning Script
|
MySQLTuner 1.9.4 - MySQL High Performance Tuning Script
|
||||||
|
|
||||||
=head1 IMPORTANT USAGE GUIDELINES
|
=head1 IMPORTANT USAGE GUIDELINES
|
||||||
|
|
||||||
|
@ -6864,6 +6869,7 @@ You must provide the remote server's total memory when connecting to other serve
|
||||||
--host <hostname> Connect to a remote host to perform tests (default: localhost)
|
--host <hostname> Connect to a remote host to perform tests (default: localhost)
|
||||||
--socket <socket> Use a different socket for a local connection
|
--socket <socket> Use a different socket for a local connection
|
||||||
--port <port> Port to use for connection (default: 3306)
|
--port <port> Port to use for connection (default: 3306)
|
||||||
|
--protocol tcp Force TCP connection instead of socket
|
||||||
--user <username> Username to use for authentication
|
--user <username> Username to use for authentication
|
||||||
--userenv <envvar> Name of env variable which contains username to use for authentication
|
--userenv <envvar> Name of env variable which contains username to use for authentication
|
||||||
--pass <password> Password to use for authentication
|
--pass <password> Password to use for authentication
|
||||||
|
|
Loading…
Reference in a new issue