Docker mysql 连接 “The server requested authentication method unknown to the clien”错误
查了下,出现这个错误的原因是从mysql 5.6开始,mysql密码加密算法更改了。
我装的mysql 8.* ,那么有两种解决方法:
- mysql 版本选择 <= 5.6
- 修改密码
docker-comopse exec mysql bash
mysql -uroot -psecret
alter user `db_user`@'%' identified with mysql_native_password by 'db_password';
flush privilefes;解决。
2018-12-5 update:
PS:Laravel中的.env设置的是:DB_CONNECTION=mysql
DB_HOST=mysql
DB_PORT=
DB_DATABASE=db_name
DB_USERNAME=db_user
DB_PASSWORD=db_pwdDB_HOST 是docker 中mysql container 名字。
DB_PORT 是mysql container 内部端口
Docker mysql 连接 “The server requested authentication method unknown to the clien”错误的更多相关文章
- Laravel - 解决连接MySQL时报"The server requested authentication method unknown to the client”错误
2019-04-12发布:hangge阅读:934 1,问题描述 最近建了个 Laravel 项目,当配置好 MySQL 数据库进行请求时,页面报如下错误: SQLSTATE[HY000] [ ...
- mysql 8.0 错误The server requested authentication method unknown to the client
mysql 安装了最新版本8.0.11后创建用户并授权后,授权的用户连接数据库提示 The server requested authentication method unknown to the ...
- php7.3连接MySQL8.0报错 PDO::__construct(): The server requested authentication method unknown to the client [caching_sha2_password]
报的错误: In Connection.php line : SQLSTATE[HY000] [] The server requested authentication method unknown ...
- PHP错误:SQLSTATE[HY000] [2054] The server requested authentication method unknown to the client
使用PHP连接MySQL 8的时候,可能会发生如标题所示的错误: SQLSTATE[HY000] [2054] The server requested authentication method u ...
- 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 ...
- Warning: mysqli_connect(): The server requested authentication method unknown to the client [caching_sha2_password]报错解决方法
错误: 解决方法:
- PHP Warning: mysqli_connect(): The server requested authentication method unknown to the client [caching_sha2_password] in /usr/local/php/CreateDB.php on line 5
原因:php还不支持mysql8.0最新的密码加密方式 ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY ' ...
- PHP连接mysql8.0出错“SQLSTATE[HY000] [2054] The server requested authentication method unkno…
今天安装安装一个叫得推校园O2O系统的使劲都说连接不上服务器. 下面是安装说明,我直接进行3步骤,导入数据库配置文件,结果就显示题目报错的内容 安装说明: 直接输入程序目录即可 http://loca ...
- PHP连接mysql8.0出错“SQLSTATE[HY000] [2054] The server requested authentication method unknow.....
这个错可能是mysql默认使用 caching_sha2_password作为默认的身份验证插件,而不再是 mysql_native_password,但是客户端暂时不支持这个插件导致的. 解决方法一 ...
随机推荐
- VBA验证工作表是否存在
使用VBA验证工作表是否存在 ============================================================= 代码区域 ================== ...
- TX2 ROS IDE开发环境配置
参考资料: http://www.mamicode.com/info-detail-1663827.html 基于Qt搭建ROS开发环境 https://blog.csdn.net/sbtxg/ ...
- struts2中文件上传
注意点 private File image;//对应的就是表单中文件上传的那个输入域的名称,Struts2框架会封装成File类型的 private String imageFileName;// ...
- css-id选择器
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8" ...
- unity3d之NGUI学习流水账
博主是跟着视频教程学的,所以最新版的u3d是否已经自带这个功能博主没有考究过. 但是视频是2015下半年的教程,当时的u3d还是需要自行导入NGUI包的. 1.首先需要下载NGUI包.点此进入ngui ...
- 区别原生chrome 和以chrome为内核的360浏览器
function isChrome360() { if( navigator.userAgent.toLowerCase().indexOf('chrome') > -1 ) { var des ...
- 转在Python中实现PageFactory模式
转自: http://www.cnblogs.com/fnng/p/5092383.html 关于 PageFactory 的概念主要是Java中内置了PageFactory类. import org ...
- pythselenium webdriver
转自:http://www.cnblogs.com/fnng/archive/2013/06/16/3138283.html 原文档地址: http://docs.seleniumhq.org/doc ...
- 測试赛C - Eqs(哈希)
C - Eqs Time Limit:5000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit Stat ...
- 2012全球SEO行业调查报告
这份报告是SEOmoz对每两年一度举办的SEO行业调查进行的分析数据,上次调查是在2010年.该调查,主要围绕SEO从业人员的特征.工作内容时间分配比例.SEO相关消费和预算.对未来市场的看法.seo ...