美文网首页
Mysql 8.0+ 开启远程访问caching_sha2_pa

Mysql 8.0+ 开启远程访问caching_sha2_pa

作者: jeffrey_hjf | 来源:发表于2019-06-20 19:04 被阅读0次
    mysql -uroot -p
    use mysql;
    //Mysql默认不允许远程登录,所以需要开启远程访问权限
    select user,authentication_string,host from user;
    update user set host = '%' where user = 'root';
    FLUSH PRIVILEGES;
    //navicat 连接 mysql 出现`Client does not support authentication protocol requested by server`
    
    alter user 'root'@'%' identified with mysql_native_password by '密码';
    //navicat 连接 mysql 出现 `Authentication plugin 'caching_sha2_password' cannot be loaded'
    ALTER USER root@localhost IDENTIFIED WITH mysql_native_password BY '密码';
    

    相关文章

      网友评论

          本文标题:Mysql 8.0+ 开启远程访问caching_sha2_pa

          本文链接:https://www.haomeiwen.com/subject/iitsqctx.html