mysql 8.0 错误The server requested authentication method unknown to the client

mysql 安装了最新版本8.0.11后创建用户并授权后,授权的用户连接数据库提示

The server requested authentication method unknown to the client

查阅一些相关的资料后发现是由于新版本的mysql账号密码解锁机制不一致导致的

解决办法:

删除创建的用户和授权,

  1. 找到mysql配置文件并加入
  2. default_authentication_plugin=mysql_native_password

变为原来的验证方式,然后从新创建用户并授权即可

  1. mysql -uroot -p
  2.  
  3. use mysql;
  4. ALTER USER ‘root‘@‘localhost‘ IDENTIFIED WITH mysql_native_password BY ‘你的密码‘;

原文地址:https://www.cnblogs.com/caicaizi/p/9430173.html

时间: 2024-07-29 12:20:17

mysql 8.0 错误The server requested authentication method unknown to the client的相关文章

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.

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

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

Warning: mysqli_connect(): The server requested authentication method unknown to the client [caching_sha2_password]报错解决方法

错误: 解决方法: 原文地址:https://www.cnblogs.com/NuoChong/p/10013272.html

PHP连接mysql8.0出错“SQLSTATE[HY000] [2054] The server requested authentication method unknow.....

这个错可能是mysql默认使用 caching_sha2_password作为默认的身份验证插件,而不再是 mysql_native_password,但是客户端暂时不支持这个插件导致的. 解决方法一:修改MySQL全局配置文件 编辑 my.cnf文件,更改默认的身份认证插件. $ vi /etc/my.cnf 在 [mysqld]中添加下边的代码 default_authentication_plugin=mysql_native_password 然后重启mysql $ service my

PDO连接mysql8.0报PDO::__construct(): Server sent charset (255) unknown to the client. Please, report to the developers错误

安装mysql8.0之后,尝试使用php连接mysql,总是报PDO::__construct(): Server sent charset (255) unknown to the client. Please, report to the developers错误,网上找了很多资料,然而都没有多大用处. 查找了mysql官方说明文档才知道原来M8.0已经已经把默认字符集升级成ut8mb4了,于是找到my.cnf文件,修改如下: 1 [client] 2 port = 3306 3 socke

MySQL安装常见错误及解决方案

错误1:wizard安装最后一页,出现cannot create Windows service for mysql.error:0 错误 解决方法:打开命令行 输入 sc delete mysql 命令即    C:>sc delete mysql    [SC] DeleteService SUCCESS 重起电脑,或者卸载后重启再安装,这样就好了.我是卸载后重启的. 卸载重新安装要注意一个问题,在控制面板中卸载后,要去c:\Documents and Settings\All Users\

Django 连接 Mysql (8.0.16) 失败

首先,确认数据库配置正确无误: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', # or use: mysql.connector.django 'NAME': 'TestDB', 'USER': 'Guest', 'PASSWORD': 'admin', 'HOST': '192.168.218.199', 'PORT': '3306', } } 但是启动项目时仍然出现如下错误: System check ide

安装 Mysql 8.0.x 的艰难体验

背景: Mysql 8.0 以后版本,在性能等方面有了很大提升,而且在自动编号.Timestamp等字段的设置上有了很方便的进步,因此在一年前即开始将原有的基于5.5版本的服务器逐渐向8.0.x 转移.但转移的过程问题颇多,主要的几个障碍如下: 1.需要各种visual c++ 的可发布版本:(8.0以后的小版本要求有所不同) 2.需要python 3.7版本.(8.0以后的小版本要求有所不同) 第一次安装时相对顺利,可能的原因是该服务器是一个“干净”的服务器,而且安装的是8.0.16版Mysq