remote 连接aliyun 服务器mysql数据库出现 not allowed to connect to this Mysql server的问题

解决步骤

1:提交工单给阿里云,反馈结果是mysql 没授予root 用户远程登陆权限。

2:登录mysql,

     2.1 use mysql

     2.2select Host, user from user;发现root的host是localhost

3:修改root的远程访问权限,因为是mysql8+的版本,所以用

      update user set host='%' where user='root';

       flush privileges;

4:select Host, user from user 确认root对应的host是%

5:通过navicate访问出现1251- Client does not support authentication protocol...upgrate client问题,字面意思是客户端验证协议不过,解决思路:

     5.1 更新最新的navicate,但收费即放弃

     5.2 把mysql用户登录密码加密规则还原成mysql_native_password

        执行:ALTER USER 'root'@'%' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER; 

        修改密码:ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '@@newpassword@@;

 6:验证搞定

你可能感兴趣的:(remote 连接aliyun 服务器mysql数据库出现 not allowed to connect to this Mysql server的问题)