远程连接数据库 出现 Client does not support authentication protocol requested by server的解决方法

解决方法如下:

      1. 通过命令行进入解压的mysql根目录下。
      2. 登陆数据库 
        mysql -uroot -p
      3. 输入root的密码 
        Enter password: ******
      4. 更改加密方式(原样拷贝到命令窗中) 
        mysql> ALTER USER 'root'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER;
      5. 更改密码:该例子中 123456为新密码 
        mysql> ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '123456';
      6. 刷新: 
      7. mysql> FLUSH PRIVILEGES;