部署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. E20180513-hm

    letter n. 信; 证书,许可证; 字母,文字; 字面意义; bracket n. 支架,悬臂; 括弧; 类别,等级; [数] 同类项; coefficient  n. 系数; (测定某种质量或 ...

  2. Linux下更改mysql版本

    想要更改linux的mysql版本,并不需要重装系统重新选择mysql版本,只需要删除掉原来的mysql然后在安装新的就可以啦 (谨记:一定要做好数据库备份) 详情请参照:大牛博客 over!over ...

  3. 一种Unity2D多分辨率屏幕适配方案

    http://www.cnblogs.com/flyFreeZn/p/4073655.html 此文将阐述一种简单有效的Unity2D多分辨率屏幕适配方案,该方案适用于基于原生开发的Unity2D游戏 ...

  4. jq weui 滚动加载的坑

    1.一般情况下使用官网给个demo就可以了,如下: var loading = false; //状态标记 $(document.body).infinite().on("infinite& ...

  5. 用vector实现普通平衡树 By cellur925

    其实我真的很想学习手写平衡树的==.但是感觉联赛前真没有时间了(太菜了.),于是先学一个STL代用苟,如果还能继续在\(tsoi\)苟,回来一定先学平衡树=w=. 然后因为窝对STL用的不是特别好,有 ...

  6. File upload in ASP.NET Core web API

    参考1:File upload in ASP.NET Core web API https://www.janaks.com.np/file-upload-asp-net-core-web-api/ ...

  7. django 之 rest framework

    一 二 三 四 五 六 七 八

  8. HDU4089(概率dp)

    题解 要点: 1.转移方程分三段,这个……有点复杂但是还好吧……大概就是求啥设啥,然后只通过可行的状态过来.在纸上记一记. 2.每层里面必须先求dp[i][i],简直就是我求我自己……用类似进制数那种 ...

  9. 181. 将整数A转换为B

    181. 将整数A转换为B 如果要将整数A转换为B,需要改变多少个bit位? 注意事项 Both n and m are 32-bit integers. 您在真实的面试中是否遇到过这个题? Yes ...

  10. 满足java对redis的所有操作,token,验证码过期时间等

    很实用 链接在此  https://www.cnblogs.com/edisonfeng/p/3571870.html System.out.println("=============== ...