天天看點

Mysql 5.7及以上的版本裡面沒有password字段錯誤日志解決辦法

想要檢視資料庫中使用者資訊,結果報錯沒有password這個字段了。原來在mysql 5.7及以上的版本裡面,password這個字段已經被authentication_string取代。

錯誤日志

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

Mysql 5.7及以上的版本裡面沒有password字段錯誤日志解決辦法

解決辦法

(1)檢視mysql中表user的結構,直接describe user

Mysql 5.7及以上的版本裡面沒有password字段錯誤日志解決辦法

(2)password替換成authentication_string

Mysql 5.7及以上的版本裡面沒有password字段錯誤日志解決辦法

繼續閱讀