报的错误:

In Connection.php line :

  SQLSTATE[HY000] [] The server requested authentication method unknown to the client (SQL: select * from information_schema.tables where table_schema = move and table_name = migrations and table_type = 'BASE TABLE')

In PDOConnection.php line :

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

In PDOConnection.php line :

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

In PDOConnection.php line :

  PDO::__construct(): The server requested authentication method unknown to the client [caching_sha2_password]

原因:

mysql8默认的使用密码认证方式不一样,mysql8.0默认使用caching_sha2_password,但是之前版本都是使用mysql_native_password

解决方案

修改caching_sha2_password为mysql_native_password

select user,host,plugin from mysql.user;

  

我这里执行了两句修改,修改root身份的“localhost”和“%”,代码如下:

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

  

执行成功:

php7.3连接MySQL8.0报错 PDO::__construct(): The server requested authentication method unknown to the client [caching_sha2_password]的更多相关文章

  1. mysql8.0:SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client

    忽然注意到的情况: 2018/7/19至2018/9/13之间发布的7.1.20.7.1.21.7.1.22和7.2.8.7.2.9.7.2.10这六个版本提供的对caching_sha2_passw ...

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

    今天安装安装一个叫得推校园O2O系统的使劲都说连接不上服务器. 下面是安装说明,我直接进行3步骤,导入数据库配置文件,结果就显示题目报错的内容 安装说明: 直接输入程序目录即可 http://loca ...

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

    这个错可能是mysql默认使用 caching_sha2_password作为默认的身份验证插件,而不再是 mysql_native_password,但是客户端暂时不支持这个插件导致的. 解决方法一 ...

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

    错误: 解决方法:

  5. Laravel - 解决连接MySQL时报"The server requested authentication method unknown to the client”错误

    2019-04-12发布:hangge阅读:934   1,问题描述 最近建了个 Laravel 项目,当配置好 MySQL 数据库进行请求时,页面报如下错误:   SQLSTATE[HY000] [ ...

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

    mysql 安装了最新版本8.0.11后创建用户并授权后,授权的用户连接数据库提示 The server requested authentication method unknown to the ...

  7. android studio连接MYSQL8.0报错:java.long.unsupportedOperation处理方案

    纠结了我大概一个星期了! 下载的别人的demo测试,因为还没学线程连接网络啥的 对方使用的版本是MYSQL5.1.14,我使用的8.0.18,同样都是阿里云服务器自建数据库. 由于是版本8.0,所以在 ...

  8. kettle 连接 mysql8.0 报错的解决办法 org.pentaho.di.core.exception.KettleDatabaseException: Error occurred while trying to connect to the database Error connecting to database: (using class org.gjt.mm.mysql.

    1.下载 mysql8.0 驱动放到 如下目录中 mysql8.0以上的驱动下载链接:mysql-connet-8.0.13 2.配置你连接的数据库 找到如下文件打开编辑 连接信息:下面是我本地的配置 ...

  9. IntelliJ IDEA集成工具Database连接MySQL8.0报错的解决方法

    直接用默认配置连接的话,会报以下错误: Connection to MySQL - @localhost failed. [08001] Could not create connection to ...

随机推荐

  1. 使用Tensorflow搭建回归预测模型之一:环境安装

    方法1:快速包安装 一.安装Anaconda 1.官网地址:https://www.anaconda.com/distribution/,选择其中一个版本下载即可,最好安装3.7版本,因为2.7版本2 ...

  2. 锁,Event,semaphore

    GIL:全局解释锁:无论开启多少个线程,同一时刻只允许执行一个线程运行(解释器级别,保护数据)锁:两种状态,锁定和未锁定,仅支持两个函数,获得锁和释放锁 多线程抢夺锁时,当某个线程获得锁了,其他的锁都 ...

  3. PAT Basic 1026 程序运行时间 (15 分)

    要获得一个 C 语言程序的运行时间,常用的方法是调用头文件 time.h,其中提供了 clock() 函数,可以捕捉从程序开始运行到 clock() 被调用时所耗费的时间.这个时间单位是 clock ...

  4. 牛客练习赛33 C tokitsukaze and Number Game (结论+字符串处理)

    链接:https://ac.nowcoder.com/acm/contest/308/C 来源:牛客网 tokitsukaze and Number Game 时间限制:C/C++ 1秒,其他语言2秒 ...

  5. 自然语言处理资源NLP

    转自:https://github.com/andrewt3000/DL4NLP Deep Learning for NLP resources State of the art resources ...

  6. Manacher || P4555 [国家集训队]最长双回文串 || BZOJ 2565: 最长双回文串

    题面:P4555 [国家集训队]最长双回文串 题解:就.就考察马拉车的理解 在原始马拉车的基础上多维护个P[i].Q[i]数组,分别表示以i结尾最长回文子串的长度和以i开头的最长回文子串的长度 然后就 ...

  7. php实现图片相似搜索

    本人qq群也有许多的技术文档,希望可以为你提供一些帮助(非技术的勿加). QQ群:   281442983 (点击链接加入群:http://jq.qq.com/?_wv=1027&k=29Lo ...

  8. luoguP1445 [Violet]樱花

    链接P1445 [Violet]樱花 求方程 \(\frac {1}{X}+\frac {1}{Y}=\frac {1}{N!}\) 的正整数解的组数,其中\(N≤10^6\),模\(10^9+7\) ...

  9. Django【第12篇】:Django之中间件

    自定义验证规则以及中间件简单介绍 1.python2和python3中的区别 对于python2内置的字符串类型有str和unicode 比如:"abc"是字符串,u"你 ...

  10. git-bash下, 启动sshd

    今天发现git-shell下居然有sshd.exe, 尝试了一下,居然起来了.在windiwos下起sshd也是如此简单. #先编辑C:\Program Files (x86)\Git\etc\ssh ...