zoukankan      html  css  js  c++  java
  • mysql--ERROR 2059 (HY000): Authentication plugin 'caching_sha2_password' cannot be loaded: /usr/lib64/mysql/plugin/caching_sha2_password.so: cannot open shared object file: No such file or directory

    问题背景:

     1、在授权机器上连接mysql 8.0的数据库,账号、密码都没有问题,报错

     2、使用 navicat工具连接8.0版本,报错

    排查思路:

     可能是创建用户没有指定插件使用了8.0自带的插件,8.0版本的mysql的加密规则是 caching_sha2_password,需要改成 mysql_native_password

    解决方案:

     1、服务器上mysql版本过低,重新安装8.0版本的mysql再连接即可。

     2、更换用户名

     3、修改加密规则

      1)使用root登录mysql,查看当前账号的加密规则

    #查看mysql版本
    select @@version;
    #查看加密方式 show variables like
    'default_authentication_plugin';
    #查看用户信息
    select host,user,plugin from mysql.user;

      2)修改加密方式(这使用test账号做测试)

    alter user 'test'@'%' identified with mysql_native_password by 'password';

  • 相关阅读:
    将u8BF7字符串转换为汉字
    ubuntu扩容
    python面试题
    OCR开源项目
    58到家数据库30条军规解读
    dvwa sql盲注教程
    python time模块详解,时间格式转换
    python正则表达式
    tr命令详解
    腐烂
  • 原文地址:https://www.cnblogs.com/Xinenhui/p/15179650.html
Copyright © 2011-2022 走看看