報錯;
進行修改密碼操做
mysql> update user set password=password(「新密碼」) where user=」用戶名」;
執行後報錯 ERROR 1054(42S22) Unknown column 'password' in ‘field list’
錯誤的緣由是 5.7版本下的mysql數據庫下已經沒有password這個字段了,password字段改爲了authentication_stringhtml
解決辦法;mysql
mysql> update mysql.user set authentication_string=password('*******') where user='*******'; #修改密碼成功 Query OK, 1 row affected, 1 warning (0.00 sec) Rows matched: 1 Changed: 1 Warnings: 1 mysql> flush privileges; #當即生效 Query OK, 0 rows affected (0.00 sec) mysql> quit Bye
參考連接:博客wangnsql