這個錯多是mysql默認使用 caching_sha2_password
做爲默認的身份驗證插件,而再也不是 mysql_native_password
,可是客戶端暫時不支持這個插件致使的。mysql
編輯 my.cnf
文件,更改默認的身份認證插件。sql
$ vi /etc/my.cnf
在 [mysqld]
中添加下邊的代碼插件
default_authentication_plugin=mysql_native_password
而後重啓mysqlrest
$ service mysqld restart