Skip to content

Commit f46cef5

Browse files
author
Jean-Marie RENOUARD
committed
Update security recommendations to support MySQL versions 8.0 and above
1 parent 0e15ac4 commit f46cef5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

mysqltuner.pl

+6-2
Original file line numberDiff line numberDiff line change
@@ -2140,7 +2140,7 @@ sub system_recommendations {
21402140
sub security_recommendations {
21412141
subheaderprint "Security Recommendations";
21422142

2143-
if ( mysql_version_eq(8) ) {
2143+
if ( mysql_version_le(8.0.0) ) {
21442144
infoprint "Skipped due to unsupported feature for MySQL 8.0+";
21452145
return;
21462146
}
@@ -2511,6 +2511,8 @@ sub mysql_version_le {
25112511
$mic ||= 0;
25122512
my ( $mysqlvermajor, $mysqlverminor, $mysqlvermicro ) =
25132513
$myvar{'version'} =~ /^(\d+)(?:\.(\d+)|)(?:\.(\d+)|)/;
2514+
#infoprint "MySQL version: $mysqlvermajor.$mysqlverminor.$mysqlvermicro";
2515+
25142516
return
25152517
int($mysqlvermajor) < int($maj)
25162518
|| ( int($mysqlvermajor) == int($maj) && int($mysqlverminor) < int($min) )
@@ -2861,7 +2863,9 @@ sub calculations {
28612863
badprint "Your server has not answered any queries: cannot continue...";
28622864
exit 2;
28632865
}
2864-
2866+
#infoprint "====>>>> MySQL version: $myvar{'version'}";
2867+
$myvar{'version'} =~ s/(.+)-.*?$/$1/;
2868+
#infoprint "====>>>> MySQL version updated: $myvar{'version'}";
28652869
# Per-thread memory
28662870
$mycalc{'per_thread_buffers'} = 0;
28672871
$mycalc{'per_thread_buffers'} += $myvar{'read_buffer_size'}

0 commit comments

Comments
 (0)