今天安裝了mysql8,但是在修改默認密碼的時候發現一直無法成功,下面給出解決的辦法。
一直報ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'password('aa123456')' at line 1;
解決的辦法;
導致這些錯誤出現的原因是mysql的版本問題,我使用的是mysql8.0.11版本,解決該問題使用的語句是:
1:“ ALTER USER 'root'@'localhost' identified by '123456' ; ”
2:flush privileges ; 刷新
https://www.cnblogs.com/laumians-notes/p/9069498.html(這篇文章講解了詳細的安裝步驟)。