Issue
I need to run automated checks against new servers. One of those checks is to detect if user (or root
) password is set or not. But..
mysql> SELECT host, user, password FROM mysql.user;
ERROR 1054 (42S22): Unknown column 'password' in 'field list'
Server version: 5.7.18-0ubuntu0.17.04.1 (Ubuntu)
Solution
MySQL versions 5.7 or higher doesnt have a column named password in mysql.user table. MySQL versions 5.7 or higher use the column authentication_string instead.
So you query should be:
SELECT host, user, authentication_string FROM mysql.user
Answered By - Raymond Nijland Answer Checked By - Terry (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.