Update Vulnerabilities list
Indenting mysqltuner Update Usage information
This commit is contained in:
parent
881479eca8
commit
b29eb05b2b
2 changed files with 76 additions and 55 deletions
12
USAGE.md
12
USAGE.md
|
@ -1,6 +1,6 @@
|
|||
# NAME
|
||||
|
||||
MySQLTuner 2.0.10 - MySQL High Performance Tuning Script
|
||||
MySQLTuner 2.1.1 - MySQL High Performance Tuning Script
|
||||
|
||||
# IMPORTANT USAGE GUIDELINES
|
||||
|
||||
|
@ -23,7 +23,7 @@ You must provide the remote server's total memory when connecting to other serve
|
|||
--mysqladmin <path> Path to a custom mysqladmin executable
|
||||
--mysqlcmd <path> Path to a custom mysql executable
|
||||
--defaults-file <path> Path to a custom .my.cnf
|
||||
--defaults-extra-file <path> Path to a extra custom config file
|
||||
--defaults-extra-file <path> Path to an extra custom config file
|
||||
--server-log <path> Path to explicit log file (error_log)
|
||||
|
||||
# PERFORMANCE AND REPORTING OPTIONS
|
||||
|
@ -42,6 +42,7 @@ You must provide the remote server's total memory when connecting to other serve
|
|||
--outputfile <path> Path to a output txt file
|
||||
--reportfile <path> Path to a report txt file
|
||||
--template <path> Path to a template file
|
||||
--dumpdir <path> Path to a directory where to dump information files
|
||||
|
||||
# OUTPUT OPTIONS
|
||||
|
||||
|
@ -85,6 +86,7 @@ You can find documentation for this module with the perldoc command.
|
|||
# AUTHORS
|
||||
|
||||
Major Hayden - major@mhtx.net
|
||||
Jean-Marie Renouard - jmrenouard@gmail.com
|
||||
|
||||
# CONTRIBUTORS
|
||||
|
||||
|
@ -122,6 +124,7 @@ Major Hayden - major@mhtx.net
|
|||
- Jean-Marie Renouard
|
||||
- Stephan GroBberndt
|
||||
- Christian Loos
|
||||
- Long Radix
|
||||
|
||||
# SUPPORT
|
||||
|
||||
|
@ -129,7 +132,7 @@ Bug reports, feature requests, and downloads at http://mysqltuner.pl/
|
|||
|
||||
Bug tracker can be found at https://github.com/major/MySQLTuner-perl/issues
|
||||
|
||||
Maintained by Major Hayden (major\\@mhtx.net) - Licensed under GPL
|
||||
Maintained by Jean-Marie Renouard (jmrenouard\\@gmail.com) - Licensed under GPL
|
||||
|
||||
# SOURCE CODE
|
||||
|
||||
|
@ -139,7 +142,8 @@ Maintained by Major Hayden (major\\@mhtx.net) - Licensed under GPL
|
|||
|
||||
# COPYRIGHT AND LICENSE
|
||||
|
||||
Copyright (C) 2006-2022 Major Hayden - major@mhtx.net
|
||||
Copyright (C) 2006-2023 Major Hayden - major@mhtx.net
|
||||
\# Copyright (C) 2015-2023 Jean-Marie Renouard - jmrenouard@gmail.com
|
||||
|
||||
For the latest updates, please visit http://mysqltuner.pl/
|
||||
|
||||
|
|
|
@ -193,6 +193,7 @@ if ($opt{dumpdir} ne '') {
|
|||
mkdir $opt{dumpdir} or die "Cannot create directory $opt{dumpdir}: $!";
|
||||
}
|
||||
}
|
||||
|
||||
# for RPM distributions
|
||||
$basic_password_files = "/usr/share/mysqltuner/basic_passwords.txt"
|
||||
unless -f "$basic_password_files";
|
||||
|
@ -799,7 +800,10 @@ sub mysql_setup {
|
|||
|
||||
# Did we already get a username with or without password on the command line?
|
||||
if ( $opt{user} ne 0 ) {
|
||||
$mysqllogin = "-u $opt{user} " . (($opt{pass} ne 0) ? "-p'$opt{pass}' " : " ") . $remotestring;
|
||||
$mysqllogin =
|
||||
"-u $opt{user} "
|
||||
. ( ( $opt{pass} ne 0 ) ? "-p'$opt{pass}' " : " " )
|
||||
. $remotestring;
|
||||
my $loginstatus = `$mysqladmincmd ping $mysqllogin 2>&1`;
|
||||
if ( $loginstatus =~ /mysqld is alive/ ) {
|
||||
goodprint "Logged in using credentials passed on the command line";
|
||||
|
@ -988,6 +992,7 @@ sub mysql_setup {
|
|||
$mysqllogin .= $remotestring;
|
||||
my $loginstatus = `$mysqladmincmd ping $mysqllogin 2>&1`;
|
||||
if ( $loginstatus =~ /mysqld is alive/ ) {
|
||||
|
||||
#print STDERR "";
|
||||
if ( !length($password) ) {
|
||||
|
||||
|
@ -1031,6 +1036,7 @@ sub select_array {
|
|||
chomp(@result);
|
||||
return @result;
|
||||
}
|
||||
|
||||
# MySQL Request Array
|
||||
sub select_csv_file {
|
||||
my $tfile = shift;
|
||||
|
@ -1046,6 +1052,7 @@ sub select_csv_file {
|
|||
}
|
||||
close $fh;
|
||||
}
|
||||
|
||||
sub human_size {
|
||||
my ( $size, $n ) = ( shift, 0 );
|
||||
++$n and $size /= 1024 until $size < 1024;
|
||||
|
@ -3921,9 +3928,9 @@ sub mysqsl_pfs {
|
|||
unless ( grep /^sys$/, select_array("SHOW DATABASES") ) {
|
||||
infoprint "Sys schema is not installed.";
|
||||
push( @generalrec,
|
||||
mysql_version_ge( 10, 0 ) ?
|
||||
"Consider installing Sys schema from https://github.com/FromDual/mariadb-sys for MariaDB" :
|
||||
"Consider installing Sys schema from https://github.com/mysql/mysql-sys for MySQL"
|
||||
mysql_version_ge( 10, 0 )
|
||||
? "Consider installing Sys schema from https://github.com/FromDual/mariadb-sys for MariaDB"
|
||||
: "Consider installing Sys schema from https://github.com/mysql/mysql-sys for MySQL"
|
||||
) unless ( mysql_version_le( 5, 6 ) );
|
||||
|
||||
return;
|
||||
|
@ -3938,9 +3945,13 @@ sub mysqsl_pfs {
|
|||
if ( defined $opt{dumpdir} and -d "$opt{dumpdir}" ) {
|
||||
for my $pfs_view ( select_array('use sys;show tables;') ) {
|
||||
infoprint "Dumping $pfs_view into $opt{dumpdir}";
|
||||
select_csv_file("$opt{dumpdir}/pfs_$pfs_view.csv", "select * from sys.$pfs_view");
|
||||
select_csv_file(
|
||||
"$opt{dumpdir}/pfs_$pfs_view.csv",
|
||||
"select * from sys.$pfs_view"
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
# Top user per connection
|
||||
subheaderprint "Performance schema: Top 5 user per connection";
|
||||
my $nbL = 1;
|
||||
|
@ -6463,11 +6474,17 @@ sub mysql_tables {
|
|||
infoprint "Disabling colstat parameter";
|
||||
|
||||
}
|
||||
|
||||
# Store all information schema in dumpdir if defined
|
||||
if ( defined $opt{dumpdir} and -d "$opt{dumpdir}" ) {
|
||||
for my $info_s_table(select_array('use information_schema;show tables;')){
|
||||
for my $info_s_table (
|
||||
select_array('use information_schema;show tables;') )
|
||||
{
|
||||
infoprint "Dumping $info_s_table into $opt{dumpdir}";
|
||||
select_csv_file("$opt{dumpdir}/ifs_${info_s_table}.csv", "select * from information_schema.$info_s_table");
|
||||
select_csv_file(
|
||||
"$opt{dumpdir}/ifs_${info_s_table}.csv",
|
||||
"select * from information_schema.$info_s_table"
|
||||
);
|
||||
}
|
||||
}
|
||||
foreach ( select_user_dbs() ) {
|
||||
|
|
Loading…
Reference in a new issue