Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FAIL Execute SQL / return code: 256 #427

Closed
tholu opened this issue Mar 8, 2019 · 12 comments
Closed

FAIL Execute SQL / return code: 256 #427

tholu opened this issue Mar 8, 2019 · 12 comments

Comments

@tholu
Copy link

tholu commented Mar 8, 2019

I'm getting the following error message(s) when running the script:

[!!] failed to execute: SELECT CONCAT(user, '@', host) FROM mysql.user WHERE IF(plugin='mysql_native_password', authentication_string, password) = PASSWORD('amateur') OR IF(plugin='mysql_native_password', authentication_string, password) = PASSWORD(UPPER('amateur')) OR IF(plugin='mysql_native_password', authentication_string, password) = PASSWORD(CONCAT(UPPER(LEFT('amateur', 1)), SUBSTRING('amateur', 2, LENGTH('amateur'))))

When I run the query manually, I get:

mysql> SELECT CONCAT(user, '@', host) FROM mysql.user WHERE IF(plugin='mysql_native_password', authentication_string, password) = PASSWORD('amateur') OR IF(plugin='mysql_native_password', authentication_string, password) = PASSWORD(UPPER('amateur')) OR IF(plugin='mysql_native_password', authentication_string, password) = PASSWORD(CONCAT(UPPER(LEFT('amateur', 1)), SUBSTRING('amateur', 2, LENGTH('amateur'))));
ERROR 1054 (42S22): Unknown column 'password' in 'where clause'

Server version: 5.7.16 MySQL Community Server (GPL)
MacOS Mojave 10.14.4 Beta (18E205e)

@solracsf
Copy link
Contributor

What version of the script are you running?
It should be fixed #373

@tholu
Copy link
Author

tholu commented Mar 11, 2019

I'm running version 1.7.15 / latest master.

It seems that the fix described in the issue (ff2a47e) was reverted (Current version: https://github.com/major/MySQLTuner-perl/blob/master/mysqltuner.pl#L1742). The ' around password are missing.

This is the commit, where the fix was reverted: 4c14ba9 (related issue #412)

@simonhampel
Copy link

I can confirm this issue.

I have two identical VPS machines (built from the same script), one was built a while ago and has MySQLTuner 1.7.14 running with no problems.

The newer machine got MySQLTuner 1.7.15 and has the errors described by @tholu

I copied the 1.7.14 from the older machine to the newer machine and it works as expected.

1.7.15 is definitely broken.

@jmrenouard
Copy link
Collaborator

Hi,

We have a fix for issue on several version MariaDB and MySQL.

This need a lot of test.

@tholu
Copy link
Author

tholu commented Mar 14, 2019

@jmrenouard What's the status of Travis? Adding tests first is definitely the way to go, as there are multiple conflicting issues, and all of them need to be solved at the same time.

@Phobos-7
Copy link

Phobos-7 commented Apr 2, 2019

This is still a problem :(
I just manually added ' around password to fix it on my servers.

@tholu
Copy link
Author

tholu commented Apr 2, 2019

This can only be solved if a comprehensive set of tests is constantly running (on Travis). This should be priority no 1 to get running again. Otherwise things will break on all ends. We already have this flip-flop situation of bugs getting "fixed" which breaks other stuff, then the other way round.

@michelsup
Copy link

michelsup commented May 23, 2019

I just manually added ' around password to fix it on my servers.

It did the trick for me as well.

@MattRiddell
Copy link

Yep, putting speechmarks around password in this line fixed it for me too:

"IF(plugin='mysql_native_password', authentication_string, 'password')";

@tholu
Copy link
Author

tholu commented Jun 26, 2019

Is there any interest in fixing this in a proper way, without breaking other things? @jmrenouard

@dvershinin
Copy link

MySQL 5.7, the issue is there for me too.

billynoah added a commit to billynoah/MySQLTuner-perl that referenced this issue Sep 10, 2019
Check to make sure mysql.user has a column called 'password'.  Adjust security_recommendations queries accordingly.

This should address issues:
major#427
major#441
major#442
@jmrenouard
Copy link
Collaborator

Working fine for me on mysql 5.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants