部署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)

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. ERROR 2059 (HY000): Authentication plugin 'caching_sha2_password' cannot be loaded

    问题: 连接Docker启动的mysql出现:ERROR 2059 (HY000): Authentication plugin 'caching_sha2_password' cannot be l ...

  2. Navicat连接MySQL数据库出现 ERROR 2059 (HY000): Authentication plugin 'caching_sha2_password' cannot be loaded

    装了mysql 8之后因为mysql8采用了新的加密方式,很多软件还不支持, 解决方法如下: 1. 管理员权限运行命令提示符,登陆MySQL mysql -u root -p 2. 修改账户密码加密规 ...

  3. file /usr/lib64/mysql/plugin/dialog.so from install of Percona-Server-server-56-5.6.24-rel72.2.el6.x86_64 conflicts with file from package mariadb-libs-1:5.5.60-1.el7_5.x86_64

    !!!点下面!!! https://www.cnblogs.com/chuijingjing/p/10005922.html

  4. mysql远程连接:ERROR 1130 (HY000): Host '*.*.*.*' is not allowed to connect to this MySQL server解决办法

    安装完MySQL后,远程连接数据库的时候,出现 ERROR 1130 (HY000): Host '192.168.0.1' is not allowed to connect to this MyS ...

  5. Mac mySql ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2)的解决办法

    我的环境:Mac 10.11.6 ,mysql  5.7.14  . mac mySql 报错ERROR 2002 (HY000): Can't connect to local MySQL serv ...

  6. Mysql 5.7 密码策略 ERROR 1819 (HY000)

    Mysql 5.7 默认对用户密码有密码强度要求,如果指定弱密码,会提示如下: ERROR (HY000): Your password does not satisfy the current po ...

  7. 解决:CentOS下的 error while loading shared libraries: libmysqlclient.so.16: cannot open shared object file: No such file or dir

    进入别人的centos,输入命令 mysql mysqladm都会报错,缺少这个共享库 libmysqlclient.so.16 . 查找下,一般都是ldconfig 没有找到共享库的位置,或者 软链 ...

  8. Running MYSQL 5.7 By Bash On Ubuntu On Windows:ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)

    root@PC-RENGUOQIANG:/usr/sbin# /etc/init.d/mysql start * Starting MySQL database server mysqld [ OK ...

  9. MaxScale ERROR 2006 (HY000): MySQL server has gone away

    Error: MaxScale cannot be run as root.Failed to write child process message!解决办法:# maxscale -f /etc/ ...

随机推荐

  1. 201621123016 《Java程序设计》第6周学习总结

    1. 本周学习总结 1.1 面向对象学习暂告一段落,请使用思维导图,以封装.继承.多态为核心概念画一张思维导图或相关笔记,对面向对象思想进行一个总结. 注1:关键词与内容不求多,但概念之间的联系要清晰 ...

  2. HDU3478 【判奇环/二分图的性质】

    题意: 给你一幅图,给你一个起点,然后问你存不存在一个时刻,所有点可以在那个时刻到达. 思路: 这幅图首先是联通的: 如果出现奇数环,则满足在某一时刻都可能到达: 然后判断奇数环用二分图性质搞也是神奇 ...

  3. Codeforces714C【映射】

    题意: T次操作: +的话就是往 multiset 塞进一个: -的话就是往 multiset 去除一个: ?操作 思路: +和-操作就是处理字符串直接实现一个原字符串改成"01" ...

  4. Java并发编程面试题1

    package com.mozq.thread.producer2; /* * 面试题2:以下代码是否存在错误 class ThreadTest implements Runnable{ public ...

  5. struts工作原理

    在struts2的应用中,从用户请求到服务器返回相应响应给用户端的过程中,包含了许多组件如:Controller.ActionProxy.ActionMapping.Configuration Man ...

  6. morphia(2)-添加

    1.简单 @Test public void add() throws Exception { final Employee em = new Employee("遥远2",500 ...

  7. StretchDIBits速度测试(COLORONCOLOR)

    下面是一个测试程序,源码下载

  8. mouseover等闪烁问题

    在使用mouseover等鼠标事件时如移动上去灰色的遮罩层高度从0到100% 在操作中发现鼠标一直在图里面但遮罩会一直变化,我感觉应该是遮罩层出现后导致鼠标离开了底层图片所以会一直变化.想起之前用的 ...

  9. Web Scalability for Startup Engineers Tip&Techniques for Scaling You Web Application --读书笔记

    Web Scalability for Startup Engineers Tip&Techniques for Scaling You Web Application 第1章和第2章讲述可伸 ...

  10. 报错:Error: ENOENT, no such file or directory 'c:\Users\Administrator\WebstormProjects\blogtest\views\footer.ejs'

    这是我在index上引用<%- include footer %>,找不到该文件 所以报错 建立文件footer.ejs