zoukankan      html  css  js  c++  java
  • authentication plugin caching_sha2

    操作系统: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的方式无效。

     方法二,暂时没有

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

  • 相关阅读:
    算法学习(十五)
    学习正则表达式笔记(三)
    学习正则表达式笔记(二)
    事件监听器
    socket(套接字)
    (转载)表驱动法
    C++文件读写
    齐次表示
    线性插值(linear interpolation)
    向上取整Ceil,向下取整Floor,四舍五入Round
  • 原文地址:https://www.cnblogs.com/Sabre/p/10328037.html
Copyright © 2011-2022 走看看