报的错误:

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';

  

执行成功:

最新文章

  1. typedef
  2. PHP while使用
  3. SSIS-包调用包错误的解决方案
  4. [LeetCode]题解(python):043-Multiply Strings
  5. POJ 1759
  6. Oracle V$SESSION详解
  7. linux系统管理
  8. index rang scan
  9. vmware-tools(vmware workstation 10.0.4)安装的时候遇到的bug
  10. OpenStack 部署总结之:在CentOS 6.5上使用RDO单机安装icehouse(Ml2+GRE)
  11. eclipse maven 打war包的几种方式
  12. javascript Json和String互转
  13. C# interface 的隐式与显示实现及适应范围源码演示
  14. PHP调用接口用post方法传送json数据
  15. 基于HTML5 Canvas 实现地铁站监控
  16. 01---JMS与消息中间件的基本概念
  17. 常见Chrome 插件
  18. MySql利用mysqldump导出/导入数据库表数据
  19. 概率p输出1,概率1-p输出0,等概率输出0和1
  20. 在windows下实时监控、接受文件变化小工具

热门文章

  1. SpringBoot项目优化和Jvm调优
  2. 011-linux服务管理
  3. JS监听浏览器标签页的显示与隐藏
  4. C#基础知识之dnSpy反编译
  5. redis 五大类型 、持久化方式以及主从(哨兵模式)
  6. gradle配置国内阿里云镜像
  7. MySQL 赋予用户权限(grant %-远程和localhost-本地区别)
  8. R语言 eval(quote(x)) 和 eval(x)
  9. 1px像素问题(移动端经典问题)
  10. extjs定时器TaskRunner