mysql 無法連接提示 Authentication plugin 'caching_sha2_password' cannot be loaded 可能是密碼沒有設置或者,密碼設置類型不符,可參考如下步驟解決 1 查看當前賬戶,和密碼 或者是否設置了authentication_string 2 ...
mysql 無法連接提示 Authentication plugin 'caching_sha2_password' cannot be loaded
可能是密碼沒有設置或者,密碼設置類型不符,可參考如下步驟解決
1 查看當前賬戶,和密碼
select user,host,password from user;
或者是否設置了authentication_string
select user,host,authentication_string,plugin from mysql.user;
2 如果沒有設置,就重置密碼
grant all privileges on *.* to 'yourname'@'localhost' identified by 'yourpassword'
或者對應第二種情況
ALTER USER 'XXXX'@'%' IDENTIFIED WITH mysql_native_password BY 'XXXXXXXX';
3 最後需要刷新下許可權
flush privilege
4 如果是不重要的用戶名,也可以通過新建用戶賦予許可權,
grant all privileges on *.* to 'xxx'@'localhost' identified by 'xxxx' ;