在早期的MySQL数据库中,用户的密码是保存在“mysql.user”表中的“password”字段中。但是从MySQL 5.7版本开始“password”字段改成“authentication_string”字段。例如,下面的语句将查询MySQL中用户的密码。
mysql> select host,user,authentication_string from user;
# 输出的信息如下:
+--------------+------------------+------------------------------------------+
| host | user | authentication_string |
+--------------+------------------+--------------------------------------<