LoginSignup
0
0

More than 5 years have passed since last update.

MySQLのユーザ一覧表示でエラーが出た

Posted at

MySQL5.7.16を使っていて、ユーザ一覧表示しようとして、

mysql> select Host, User, Password from mysql.user;

と入力したら、

ERROR 1054 (42S22): Unknown column 'Password' in 'field list'

となって、驚いた。壊してしまったかと思いました。

MySQL5.7から、パスワードを格納しているカラムが「password」から「authentication_string」に変更されたんですね。

なので

select Host,User,authentication_string from mysql.user;

でいつものように表示されました。

+----------+------+--------------+
| Host   |User|authentication_string |
+----------+------+--------------+
| localhost |root|#################|
+----------+------+---------------+

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0