zoukankan      html  css  js  c++  java
  • 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

    部署docker下的mysql时出现以下报错

    [root@docker ~]# mysql -h192.168.30.22 -uroot -p

    Enter password:

    出现报错:

    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

    原因应该是mysql版本问题

    解决方案

    [root@docker ~]# docker exec -it lnmp_mysql bash

    root@63259bee4195:/#  mysql -uroot -p123456

    mysql> alter user 'root'@'%' identified with mysql_native_password by 'root';

    Query OK, 0 rows affected (0.04 sec)

    [root@docker ~]# mysql -h192.168.30.22 -uroot -p

    Enter password:

    Welcome to the MariaDB monitor.  Commands end with ; or g.

    Your MySQL connection id is 22

    Server version: 8.0.16 MySQL Community Server - GPL

    Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

    Type 'help;' or 'h' for help. Type 'c' to clear the current input statement.

    MySQL [(none)]> show databases;

    +--------------------+

    | Database           |

    +--------------------+

    | information_schema |

    | mysql              |

    | performance_schema |

    | sys                |

    | wp                 |

    +--------------------+

    5 rows in set (0.02 sec)

  • 相关阅读:
    练习写一个工资结算系统
    【课堂】模拟奥特曼打小怪兽
    模拟简单对打(昨天代码的小修改)
    模拟简单游戏创建类
    数组的应用练习
    Java基础的思维导图
    springBoot集成MyBatis和Mybatis自动生成代码GeneratorMapper.xml配置
    ubuntu14.04安装eclipse没有标题
    ubuntu14.04安装Hadoop0.20.2
    Apache编码问题
  • 原文地址:https://www.cnblogs.com/zc1741845455/p/11082093.html
Copyright © 2011-2022 走看看