Skip to content

Commit ecd2da6

Browse files
committed
'name resolution is active' should be OK when cPanel is detected #561
1 parent 0fdcda8 commit ecd2da6

1 file changed

Lines changed: 9 additions & 3 deletions

File tree

mysqltuner.pl

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env perl
2-
# mysqltuner.pl - Version 1.9.5
2+
# mysqltuner.pl - Version 1.9.6
33
# High Performance MySQL Tuning Script
44
# Copyright (C) 2006-2022 Major Hayden - major@mhtx.net
55
# Copyright (C) 2006-2022 Jean-Marie Renouard - jmrenouard@gmail.com
@@ -57,7 +57,7 @@ package main;
5757
#use Env;
5858

5959
# Set up a few variables for use in the script
60-
my $tunerversion = "1.9.5";
60+
my $tunerversion = "1.9.6";
6161
my ( @adjvars, @generalrec );
6262

6363
# Set defaults
@@ -3164,12 +3164,18 @@ sub mysql_stats {
31643164
infoprint
31653165
"Skipped name resolution test due to missing skip_name_resolve in system variables.";
31663166
}
3167+
elsif ( -r "/etc/psa/.psa.shadow" and $result{'Variables'}{'skip_name_resolve'} eq 'OFF') {
3168+
infoprint "CPanel and Flex system skip-name-resolve should be on";
3169+
push (@generalrec, "cPanal and skip-name-resolve: https://support.cpanel.net/hc/en-us/articles/360052752094");
3170+
push (@adjvars, "skip-name-resolve=0");
3171+
}
31673172
elsif ( $result{'Variables'}{'skip_name_resolve'} eq 'OFF' ) {
31683173
badprint
31693174
"name resolution is active : a reverse name resolution is made for each new connection and can reduce performance";
31703175
push( @generalrec,
31713176
"Configure your accounts with ip or subnets only, then update your configuration with skip-name-resolve=1"
31723177
);
3178+
push (@adjvars, "skip-name-resolve=1");
31733179
}
31743180

31753181
# Query cache
@@ -6860,7 +6866,7 @@ sub which {
68606866
68616867
=head1 NAME
68626868
6863-
MySQLTuner 1.9.5 - MySQL High Performance Tuning Script
6869+
MySQLTuner 1.9.6 - MySQL High Performance Tuning Script
68646870
68656871
=head1 IMPORTANT USAGE GUIDELINES
68666872

0 commit comments

Comments
 (0)