windows10環境下navicat連接MySQL8.0出現2059錯誤

在mysql8之前的版本使用的密碼加密規則是mysql_native_password,但是在mysql8則是caching_sha2_password。

解決方案有很多,我是創建了一個新用戶,並指定加密規則爲:mysql_native_password,這樣的話,僅需要執行以下語句即可:
create user 'your username'@'%' identified with mysql_native_password by 'your password

例如:創建用戶'zhangsan(我的是譬如名+姓的英文小寫)'''%'用mysql_native_password標識'123654'

也可以直接修改我的配置文件,將默認密碼規則設置爲mysql_native_password,刷新權限並重置根密碼即可。

default_authentication_plugin=mysql_native_password

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章