一、安裝mysql 后,連接失敗,報1251錯誤,部分原因是mysql8.0的plugin與之前的版本有差異,報錯如圖:

二、解決方法如下
1.查看mysql用戶,命令如下 select host,user,plugin,authenticationstring from mysql.user;

2.修改root用戶密碼,命令:alter user 'root'@ 'localhost' identified with mysql_native_password by '自己的新密碼';
更新下:plush privileges;

3.再次連接,連接成功,(本機使用navicat連接)

轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/228962.html
標籤:MySQL
上一篇:連接mysql資料庫時區問題
