PDO::__construct(): Server sent charset (255) unknown to the client. Please, report to the developers
微擎出错信息:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] [2054] Server sent charset unknown to the client. Please, report to the developers' in /data/backup/weifang/framework/class/db.class.php:55 Stack trace: #0 /data/backup/weifang/framework/class/db.class.php(55): PDO->__construct('mysql:dbname=we...', 'root', 'gPYD3t24', Array) #1 /data/backup/weifang/framework/class/db.class.php(25): DB->connect(Array) #2 /data/backup/weifang/framework/function/pdo.func.php(19): DB->__construct(Array) #3 /data/backup/weifang/framework/function/pdo.func.php(65): pdo() #4 /data/backup/weifang/framework/function/cache.mysql.func.php(9): pdo_getcolumn('core_cache', Array, 'value') #5 /data/backup/weifang/framework/function/cache.func.php(39): cache_read('setting') #6 /data/backup/weifang/framework/model/setting.mod.php(34): cache_load('setting') #7 /data/backup/weifang/framework/bootstrap.inc.php(129): setting_load() #8 /data/backup/weifang/index.php(6): require('/data/backup/we...') #9 {main} thrown in /data/backup/weifang/framework/class/db.class.php on line 55
换成mysql 8.0了,其默认编码修改成了utfmb4,需要修改配置文件:
[client]
default-character-set=utf8 [mysql]
default-character-set=utf8 [mysqld]
collation-server = utf8_unicode_ci
character-set-server = utf8
完毕。
PDO::__construct(): Server sent charset (255) unknown to the client. Please, report to the developers的更多相关文章
- 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. ...
- Mac环境下PHP连接mysql提示Server sent charset (255) unknown和(HY000/2054)
错误提示: mysqli_connect(): Server sent charset (255) unknown to the client. Please, report to the devel ...
- 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 ...
- Laravel - 解决连接MySQL时报"The server requested authentication method unknown to the client”错误
2019-04-12发布:hangge阅读:934 1,问题描述 最近建了个 Laravel 项目,当配置好 MySQL 数据库进行请求时,页面报如下错误: SQLSTATE[HY000] [ ...
- 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 ...
- mysql 8.0 错误The server requested authentication method unknown to the client
mysql 安装了最新版本8.0.11后创建用户并授权后,授权的用户连接数据库提示 The server requested authentication method unknown to the ...
- 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 ' ...
随机推荐
- java中可以对时间进行加减处理,有时候不用在sql语句中处理
String ssny = (String) pd.get("ssny"); SimpleDateFormat simpleDateFormat=new SimpleDateF ...
- hdu 2091空心三角形
把一个字符三角形掏空,就能节省材料成本,减轻重量,但关键是为了追求另一种视觉效果.在设计的过程中,需要给出各种花纹的材料和大小尺寸的三角形样板,通过电脑临时做出来,以便看看效果. Input每行包含 ...
- a标签点击不跳转的几种方法
a标签点击不跳转的几种方法 1.onclick事件中返回false <a href="http://www.baidu.com" onclick="return f ...
- 分布式事务?咱先弄明白本地事务再说 - ACID
过去一段时间面试的同学,对于数据库事务,可以按照配置正常使用,但很多都无法讲清楚和理解数据库事务这个东西真正的意义,以及互联网兴起以后,当今数据库在ACID面前面临怎样的问题和抉择. 事务,是各大 ...
- SpringBoot整合elasticsearch
在这一篇文章开始之前,你需要先安装一个ElasticSearch,如果你是mac或者linux可以参考https://www.jianshu.com/p/e47b451375ea,如果是windows ...
- 声明式调用---Feign
Feign:Feign是一种声明式.模板化的HTTP客户端. 用我的理解来说,Feign的功能类似dubbo暴露服务,但是与dubbo稍有不同的是Feign是HTTP REST接口的形式暴露的. 这一 ...
- Centos6.5部署Rsyslog-日志的存储方式及监测服务状态
1.以IP地址命名 在/etc/rsyslog.conf中加入如下配置,并做好备注.添加这三行配置之后,远程日志会被单独输出到一个以IP命名的日志文件中. #IP format by zhz at x ...
- 基于CC2530/CC2430 的温湿度采集系统--DHT11
采用常用的温湿度传感器DHT11 参见论坛中实例视频讲解http://bphero.com.cn/forum.php?mod=viewthread&tid=15&extra=page% ...
- [USACO18JAN]Stamp Painting
Description: Bessie想拿\(M\) 种颜色的长为\(K\) 的图章涂一个长为\(N\) 的迷之画布.假设他选择涂一段区间,则这段区间长度必须为\(K\) ,且涂完后该区间颜色全变成图 ...
- BZOJ4218 : 不知道高到哪里去了
设$degi[x]$和$dego[x]$分别表示每个点的入度和出度,将线性规划的限制写出来: 目标函数: $\max.\ \sum_{x=1}^n(dego[x]P[x]-degi[x]Q[x])$ ...