此問題是由于高版本MySQL更改加密方式導致,部分低版本的連接工具可能不支持改加密方式。
解決方法:
mysql -u root // 登錄MySQL
use mysql; // 進入MySQL數據庫
select user,plugin from user where user='root'; // 查看root用戶使用的plugin
ps: 如果是其他用戶,請更換成 select user,plugin from user where user='其他用戶';
image.png
我們需要把 caching_sha2_password 更換成 mysql_native_password;
ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '';