Skip to content

Unknown column 'password' in 'where clause' #373

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

Closed
fmonts opened this issue Mar 15, 2018 · 7 comments
Closed

Unknown column 'password' in 'where clause' #373

fmonts opened this issue Mar 15, 2018 · 7 comments
Assignees

Comments

@fmonts
Copy link

fmonts commented Mar 15, 2018

I updated mysqltuner to the latest version and I see a lot of errors in the step where it checks for common passwords.

I'm using Percona Server 5.7.21-20

And example of failing query:
SELECT CONCAT(user, '@', host) FROM mysql.user WHERE IF(plugin='mysql_native_password', authentication_string, password) = PASSWORD('86') OR IF(plugin='mysql_native_password', authentication_string, password) = PASSWORD(UPPER('86')) OR IF(plugin='mysql_native_password', authentication_string, password) = PASSWORD(CONCAT(UPPER(LEFT('86', 1)), SUBSTRING('86', 2, LENGTH('86'))))

[!!] FAIL Execute SQL / return code: 256

The error is Unknown column 'password' in 'where clause'

@Trashtravis
Copy link

Trashtravis commented Mar 15, 2018

Hey fam I had same issue on mysql community version 5.7.21

ISSUE:
It's really silly on line
1698: "IF(plugin='mysql_native_password', authentication_string, password)";
Quick fix:
Add quotes to the word password so the line will be like:
"IF(plugin='mysql_native_password', authentication_string, 'password')";

Save and run again the script.

@fmonts
Copy link
Author

fmonts commented Mar 15, 2018

Thank you!

@xXxSPYxXx
Copy link

Thy, its help. Need fix in main branch

@jmrenouard
Copy link
Collaborator

HI, anybody get some feedback ?

@Trashtravis
Copy link

Trashtravis commented Mar 28, 2018

Hi @jmrenouard it works fine for me now.

Tested on mysql community version 5.7.21

Thanks

@jmrenouard
Copy link
Collaborator

Thanks

@virms77
Copy link

virms77 commented Feb 15, 2019

Thanks!

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

5 participants