为图方便,懒得在mac上安装mysql了,一个是管理不方便,第二个是为了方便多机器同步开发环境。就使用docker安装了。

拉取mysql镜像
docker pull mysql

运行mysql实例
docker run --name mysql -p 12345:3306 -e MYSQL_ROOT_PASSWORD=root -d mysql:latest

就是这么两步,一切就是这么美好:)

结果一连上去,就发现报错了Authentication plugin 'caching_sha2_password' cannot be loaded

Google了一下,找到解决方案:

进入容器
docker exec -it mysql bash

然后以root身份登录mysql
mysql --user=root --password

输入root的密码(默认为'root')最后运行:
ALTER USER 'root' IDENTIFIED WITH mysql_native_password BY 'password';

参考资料:

  1. https://stackoverflow.com/questions/49194719/authentication-plugin-caching-sha2-password-cannot-be-loaded
  2. https://github.com/passbolt/passbolt_docker/issues/103

解决mysql for docker容器报错:Authentication plugin 'caching_sha2_password' cannot be loaded的更多相关文章

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

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

  2. ERROR 2059 (HY000): Authentication plugin 'caching_sha2_password' cannot be loaded

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

  3. 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 ...

  4. mysql 无法连接提示 Authentication plugin 'caching_sha2_password' cannot be loaded

    mysql 无法连接提示 Authentication plugin 'caching_sha2_password' cannot be loaded 可能是密码没有设置或者,密码设置类型不符,可参考 ...

  5. Mac_Navicat Premium连接MySQL错误2059 - Authentication plugin 'caching_sha2_password' cannot be loaded: dlopen(../Frameworks/caching_sha2_password.so, 2): image not found

    mac下MySql启动连接报错:Authentication plugin ‘caching_sha2_password’ cannot be loaded: dlopen(/usr/local/my ...

  6. MySQL Authentication plugin 'caching_sha2_password' cannot be loaded

    很多用户在使用Navicat Premium 12连接MySQL数据库时会出现Authentication plugin 'caching_sha2_password' cannot be loade ...

  7. MySql 8.0.11 客户端连接失败:2059 - Authentication plugin 'caching_sha2_password' cannot be loaded: ....

    近期,换了新笔记本,重新安装了MySql数据库和客户端工具Navicat Premium 12.我是从官网上下载的MySql数据库,版本为8.0.11,链接:https://dev.mysql.com ...

  8. authentication plugin caching_sha2_password cannot be loaded

    最近下载新的MySQL8.0 来使用的时候, 通过sqlyog.或者程序中连接数据库时,提示:Authentication plugin 'caching_sha2_password' cannot ...

  9. 2059 - Authentication plugin 'caching_sha2_password' cannot be loaded: dlopen(../Frameworks/caching_sha2_password.so, 2): image not found

    mac本地安装mysql后,navicat连接报错: - Authentication plugin ): image not found 解决方法 在控制台登陆后重新改下密码即可 ALTER USE ...

随机推荐

  1. 吴裕雄 python 机器学习——线性判断分析LinearDiscriminantAnalysis

    import numpy as np import matplotlib.pyplot as plt from matplotlib import cm from mpl_toolkits.mplot ...

  2. python学习Day13 函数的嵌套定义、global、nonlocal关键字、闭包及闭包的运用场景、装饰器

    复习 1.函数对象:函数名 => 存放的是函数的内存地址1)函数名 - 找到的是函数的内存地址2)函数名() - 调用函数 => 函数的返回值 eg:fn()() => fn的返回值 ...

  3. pip安装scrapy出错解决措施

    安装报错提示: building 'twisted.test.raiser' extensionerror: Microsoft Visual C++ 14.0 is required. Get it ...

  4. 微信小程序-数据绑定

    在js页面的data字典内添加绑定数据 data: { "messg":"helloworld " }, 在wxml页面内使用{{}}调用数据

  5. Linux中JDK安装教程

    JDK在官网下载,也可以从某个文件服务器进行下载. 1.在usr目录创建一个java文件夹: mkdir java 2.进入刚创建的java文件夹,下载jdk: cd /usr/java 例如: wg ...

  6. 对于在git上面拉代码报"error: RPC failed; curl 56 OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 10054"解决方法

    主要原因是安全设置的问题: 首先执行git config http.sslVerify "false"   若出现下列错误 git config http.sslVerify &q ...

  7. oracle数据库查询语句case的用法

    实现功能: 1.先查询status=2的记录,如果查询到记录则返回第一条记录的Product_Name:2.如果查询不到status=2的记录,则判断status=1的记录是否存在,不存在则返回“请耐 ...

  8. d3.js 平移缩放

    rt 记录一下 var zoom = d3.zoom() .scaleExtent([0.1,10]) .on("zoom", zoomed); function zoomed() ...

  9. python--第二十三天总结(一对多和多对多)

    Django 的 ORM 有多种关系:一对一,多对一,多对多. 各自定义的方式为 :        一对一: OneToOneField        多对一: ForeignKey        多 ...

  10. json对象和字符串的相互转换

    JSON.stringify(obj)       将JSON对象转为字符串. JSON.parse(string)       将字符串转为JSON对象格式. 后台给你数据的时候,有时候会给你字符串 ...