Authentication method 'caching_sha2_password' not supported by any of the av的解决方法

Authentication method ‘caching_sha2_password‘ not supported by any of the av的意思是任何av都不支持身份验证方法“缓存密码”

通常的报这个错误是因为它的身份验证方式是  mysql_native_password 方式,不是caching_sha2_password方式

方法一

如果是通过解压去安装的MySQL 8.0版本

1、找一下看有没有my.ini文件

没有就在你解压密闭的目录下新创建一个my.ini文件

my.ini文件中的内容:(注:可以直接复制下面的,涉及到存放目录的可以根据自己实际情况做更改)

[mysqld]

# 设置3306端口

port=3306

# 设置mysql的安装目录

basedir=D:\Program Files\mysql-8.0.19-winx64

# 切记此处一定要用双斜杠\\,单斜杠这里会出错。

# 设置mysql数据库的数据的存放目录

datadir=D:\Program Files\mysql-8.0.19-winx64\\Data
# 此处同上

# 允许最大连接数

max_connections=200

# 允许连接失败的次数。这是为了防止有人从该主机试图攻击数据库系统

max_connect_errors=10

# 服务端使用的字符集默认为UTF8

character-set-server=utf8

# 创建新表时将使用的默认存储引擎

default-storage-engine=INNODB

# 默认使用“mysql_native_password”插件认证

default_authentication_plugin=mysql_native_password

[mysql]

# 设置mysql客户端默认字符集

default-character-set=utf8

[client]

# 设置mysql客户端连接服务端时默认使用的端口

port=3306

default-character-set=utf8

方法二

这里我是用Navicat Premium 12去改的

1、连接数据库后,选择点击工具后再点击命令列界面

2、输入命令查看用户身份验证方式:SELECT Host, User, plugin from user;

3、修改某个用户账号的身份验证方式:ALTER USER ‘root‘@‘localhost‘ IDENTIFIED WITH mysql_native_password BY ‘12345‘;

4、 再去查看一下是否已经更改了

Authentication method 'caching_sha2_password' not supported by any of the av的解决方法

原文地址:https://www.cnblogs.com/Loners/p/12347273.html

时间: 2024-08-01 02:49:15

Authentication method 'caching_sha2_password' not supported by any of the av的解决方法的相关文章

Authentication method 'caching_sha2_password' not supported by any of the available plugins.

这是MySQL8.0一个登录验证的问题. 第一步 初始化配置 如果已经初始化了,就直接跳过第一步 你需要知道的是:MySQL安装的路径.我的路径是:G:\mysql-8.0.11-winx64 在C:\Windows\System32路径下找到cmd.exe,右键以管理员身份运行,并切换到mysql-8.0.11-winx64中. 输入命令初始化data目录: mysqld --initialize --console 会出现一段内容,找到内容中root@localhost: 它后面就是登录数据

The server requested authentication method unknown to the client

SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client. In MySQL 8.0+, the default authentication plugin has changed from 'mysql_native_password' to 'caching_sha2_password', and the 'root'@'localhost' administrative a

PHP错误:SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client

使用PHP连接MySQL 8的时候,可能会发生如标题所示的错误: SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client 发生这种错误,是由于MySQL 8默认使用了新的密码验证插件:caching_sha2_password,而之前的PHP版本中所带的mysqlnd无法支持这种验证.解决这个问题,有两种办法. 一种办法是升级PHP支持MySQL 8的新验证插件. PHP 7.

mysql错误:this authentication plugin is not supported

this authentication plugin is not supported 应用程序连接mysql docker一直报错:this authentication plugin is not supported. google发现,原来是mysql新版本(8.0以上)将root用户使用的plugin更新成caching_sha2_password. 登录mysql输入如下命令可以看到: mysql> select user,plugin from mysql.user;+-------

Asp.Net Core 3.1 获取不到Post、Put请求的内容 System.NotSupportedException Specified method is not supported

问题 是这样的,我.net core 2.1的项目,读取.获取Post请求内容的一段代码,大概这样: [HttpPost] public async Task<IActionResult> Test([FromBody]string postStr) { using (var reader = new StreamReader(Request.Body, System.Text.Encoding.UTF8)) { reader.BaseStream.Seek(0, SeekOrigin.Beg

SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client

安装 nextcloud 的时候选择的是 mysql ,在链接 mysql 的时候报错,信息如下: SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client 搜索了下应该是 MySQL 8默认使用了新的密码验证插件:caching_sha2_password ,而有些 PHP 版本不支持这个问题造成的 解决办法: 修改登录用户的 plugin 为 mysql_native_pas

springmvc表单提交出现WARNING: Request method &#39;GET&#39; not supported

明明表单提交的method设置为post,然后在controller那设置只能请求为post请求 然后第一次post请求是正常的,第二次开始后便不正常了,出现post的请求302,get请求405:这个结果很纳闷吧 <!--注意action的路径--> <form id="form1" action="upload" method="post" enctype="multipart/form-data">

Network authentication method and device for implementing the same

A network authentication method is to be implemented using a network authentication device and a user end for authenticating the user end. The network authentication method includes the steps of: configuring the network authentication device to store

SpringMVC框架出现 405 request method post not supported 的解决方法

在SpringMVC框架中当使用post请求服务,然后请求成功转到一个静态文件,如html,htm等网页时.页面出现405 request method post not supported错误,只要在spring的配置文件中加入下面代码即可: <bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"> <property name="urlMap"&