原因
是由於目前已有的客戶端連接軟件還不支持Mysql8新增加的加密方式caching_sha2_password,所以我們需要修改用戶的加密方式,將其改為老的加密驗證方式。
大安裝Mysql數據庫的主機上登錄Mysql對應的用戶,上面連接時用的用戶為root,所以我們登錄root用戶。
解決
- select user,plugin from user where user='root';
可以看到當前用戶的加密方式為caching_sha2_password
- alter user 'root'@'%' identified with mysql_native_password by '你的木馬';
將用戶的加密方式改為mysql_native_password
- flush privileges