操作系统:windows 10

mysql版本:mysql  Ver 8.0.11 for Win64 on x86_64 (MySQL Community Server - GPL)

安装完mysql,尝试用PHP连接以后,再打开workbench报此错:authentication plugin caching_sha2

原因:

mysql 8.0 默认使用 caching_sha2_password 身份验证机制 —— 从原来的 mysql_native_password 更改为 caching_sha2_password。

从 5.7 升级 8.0 版本的不会改变原有用户的身份验证方法,但新用户会默认使用新的 caching_sha2_password。

因客户端不支持新的加密方式所致。

解决方法一,改回去。

此时客户端已经无法登录,只能用命令行:

mysql -u root -p;

输入密码后会登录成功,此时再输入以下命令:

ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '1111';

此处的1111是你的密码。

参考:https://blog.csdn.net/u012613251/article/details/80346665

同时,经测试,修改my.ini的方式无效。

方法二,暂时没有

新事物出现的时候,应当学习和适应新事物,而不是简单粗暴地改回去,但目前不知道其它方法。

authentication plugin caching_sha2的更多相关文章

  1. ActiveMQ(5.10.0) - Configuring the Simple Authentication Plug-in

    The easiest way to secure the broker is through the use of authentication credentials placed directl ...

  2. ActiveMQ(5.10.0) - Configuring the JAAS Authentication Plug-in

    JAAS provides pluggable authentication, which means ActiveMQ will use the same authentication API re ...

  3. Configure the MySQL account associate to the domain user via MySQL Windows Authentication Plugin

    在此记录如何将之前一次做第三发软件在配置的过程. 将AD user通过代理映射到mysql 用户. 在Mysql官网有这样一段话: The server-side Windows authentica ...

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

  5. 解决mysql for docker容器报错:Authentication plugin 'caching_sha2_password' cannot be loaded

    为图方便,懒得在mac上安装mysql了,一个是管理不方便,第二个是为了方便多机器同步开发环境.就使用docker安装了. 拉取mysql镜像 docker pull mysql 运行mysql实例 ...

  6. DBeaver连接MySQL 8.0显示"Unable to load authentication plugin 'caching_sha2_password'."错误的问题

    下载MySQL绿色版本mysql-8.0.12-winx64,手动安装完成后.使用DBeaver连接提示"Unable to load authentication plugin 'cach ...

  7. authentication plugin caching_sha2_password cannot be loaded

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

  8. 【问题解决】连接mysql 8错误:authentication plugin 'caching_sha2_password

    在刚安装好mysql8,使用native连接的时候报错 authentication plugin 'caching_sha2_password'... 首先确保服务已开启,然后通过cmd命令进入my ...

  9. Navicat连接MySQL,出现2059 - authentication plugin 'caching_sha2_password'的解决方案

    昨天当我把MySQL的安装程序下载并安装好,然后又下载了另外一个工具来使用它,该工具的名称是Navicat Premium,当我通过该工具连接MySQL Workbench的时候,无法连接,提示“20 ...

随机推荐

  1. Attempt to present <TestViewController2: 0x7fd7f8d10f30> on <ViewController: 0x7fd7f8c054c0> whose view is not in the window hierarchy!

    当 storyboard里面的 按钮 即连接了 类文件里面的点击方法  又  连接了   storyboard里 另一个  控制器的  modal 就会出现类似Attempt to present & ...

  2. 在 Swift 中调用 OC 代码

    前言 在 Swift 语言中,我们可以使用 Objective-C.C 语言编写代码,我们可以导入任意用 Objective-C 写的 Cocoa 平台框架.Objective-C 框架或 C 类库. ...

  3. ASP.NET中TimeSpan的用法

    一.TimeSpan常量.字段 TimeSpan.MaxValue; // 10675199.02:48:05.4775807TimeSpan.MinValue; //-10675199.02:48: ...

  4. SNF开发平台WinForm-表单验证控件-通用

    CS程序也能做到像BS程序一样的验证效果,如下: 1.验证控件的展示 校验时如果不符合验证条件的控件,会在控件上显示较显眼的图标. 当出现不符合验证的控件时,鼠标悬浮会显示自定义的提示信息. 如:输入 ...

  5. 源码分析HotSpot GC过程(一)

    «上一篇:源码分析HotSpot GC过程(一)»下一篇:源码分析HotSpot GC过程(三):TenuredGeneration的GC过程 https://blogs.msdn.microsoft ...

  6. Linux判断文件是否为空,不为空则打印该文件的大小

    Linux判断文件是否为空,不为空则打印该文件的大小,使用到的命令是-s + filename -s filename 如果文件大小大于0,则返回true. 例如: 查看当前目录 # ls -l to ...

  7. Python 的 Magic Methods 指南(转)

    介绍 本指南是数月博客的总结.主题是魔术方法. 什么是魔术方法呢?它们是面向对象Python语言中的一切.它们是你可以自定义并添加“魔法”到类中的特殊方法.它们被双下划线环绕(比如__init__或_ ...

  8. 【转】JS获取浏览器可视区域的尺寸

    from: http://www.xiaoboy.com/detail/1341545044.html 所谓可视区域是指能看得见的区域,即在浏览器中能看到页面的区域(高度与宽度).刚刚使用 docum ...

  9. 深度学习的batch_size

    知乎讨论: https://www.zhihu.com/question/61607442/answer/204675996 案例一 http://www.myzaker.com/article/5a ...

  10. Javascript 检测键盘按键

    Javascript中 有3个事件句柄在对应键盘的输入状态:keydown.keypress和keyup. 分别对应的意思是:按键被按下(按下按键但还没有抬起).点击按键(按下并抬起按键).按键抬起( ...