在一次使用mysql數據庫是出現了這種錯誤,於是乎去百度看了很多博文踩了很多坑,最終解決了問題,分享給大家。
轉載與:https://blog.csdn.net/css33/article/details/93233590
問題截圖:
問題解決步驟:
1:
使用sudo mysql -u root -p登錄Mysql
成功登錄mysql
步驟2:查看數據庫
步驟3 :選中mysql中的User
步驟4:更改root用戶的密碼
update mysql.user set authentication_string=PASSWORD('xxx'),plugin='mysql_n
ative_password' where user='root';
步驟5:刷新數據庫,並重啟數據庫服務
flush privileges;
service mysql restart;
這樣問題就解決啦,解決后的截圖