major / MySQLTuner-perl

MySQLTuner is a script written in Perl that will assist you with your MySQL configuration and make recommendations for increased performance and stability.
GNU General Public License v3.0
8.94k stars 1.29k forks source link

FAIL Execute SQL / return code: 256 #442

Closed KarelWintersky closed 5 years ago

KarelWintersky commented 5 years ago

A lot of reports like this:

[!!] FAIL Execute SQL / return code: 256
[!!] failed to execute: SELECT CONCAT(user, '@', host) FROM mysql.user WHERE IF(plugin='mysql_native_password', authentication_string, password) = PASSWORD('38') OR IF(plugin='mysql_native_password', authentication_string, password) = PASSWORD(UPPER('38')) OR IF(plugin='mysql_native_password', authentication_string, password) = PASSWORD(CONCAT(UPPER(LEFT('38', 1)), SUBSTRING('38', 2, LENGTH('38'))))
[!!] FAIL Execute SQL / return code: 256

ubuntu 16.04 MySQLTuner version 1.7.15 mysql Ver 14.14 Distrib 5.7.26

raatti commented 5 years ago

Duplicate of #427 ?

KarelWintersky commented 5 years ago

May be. Solution required

mozzee commented 5 years ago

try to do a force upgrade " mysql_upgrade -u root -p --force" otherwise a dirty fix would be to update mysql user table for missing columns ie

ALTER TABLE user ADD Create_tablespace_priv ENUM('N','Y') NOT NULL DEFAULT 'N' AFTER Trigger_priv; ALTER TABLE user ADD plugin CHAR(64) NULL AFTER max_user_connections; ALTER TABLE user ADD authentication_string TEXT NULL DEFAULT NULL AFTER plugin; ALTER TABLE user ADD password_expired ENUM('N','Y') NOT NULL DEFAULT 'N' AFTER authentication_string;

cC-Xx commented 5 years ago

can you please check this patch out? hope it will help ...

cat /usr/ports/databases/mysqltuner/files/patch-mysqltuner.pl

--- mysqltuner.pl.orig 2019-09-25 17:34:50.547651000 +0300 +++ mysqltuner.pl 2019-09-25 17:35:28.725401000 +0300 @@ -1739,7 +1739,7 @@ my $PASS_COLUMN_NAME = 'password'; if ( $myvar{'version'} =~ /5.7|10..MariaDB/ ) { $PASS_COLUMN_NAME = -"IF(plugin='mysql_native_password', authentication_string, password)"; +"IF(plugin='mysql_native_password', authentication_string, 'password')"; } debugprint "Password column = $PASS_COLUMN_NAME";

thanx

P.S.: source: http://www.webhostingtalk.com/showthread.php?t=1765158

jmrenouard commented 5 years ago

Hi, MySQLtuner password checks are working fine on mysql 5.7. and mariaDB 10.0/10.1/10.2/10.3/10.4.

I close this issue and version 1.7.17 is ok for me.