修改 my.cnf,使用原生密码
修改 /etc/mysql/my.cnf
(我是 Ubuntu 16.04),添加下面一行:
default-authentication-plugin= mysql_native_password
然后重置密码:
ALTER USER 'user'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
ALTER USER 'user'@'%' IDENTIFIED WITH mysql_native_password BY 'password';
@‘loaclhost' 修改本地密码
@‘%’ 修改远程密码