安装MySQL的机器上使用最高权限用户登陆MySQL:
mysql -u root -p
修改权限:
ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'yourpassword';
更新:
flush privileges;
退出:
exit;
再次连接成功