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 ' ...
随机推荐
- react-route4 学习记录
新建项目 create-react-app react20180413 安装路由 npm install react-router-dom -S 跑通路由 删除全部文件后 重新新建index.js 代 ...
- kafka告警简单方案
一.前言 为什么要设计kafka告警方案?现成的监控项目百度一下一大堆,KafkaOffsetMonitor.KafkaManager. Burrow等,具体参考:kafka的消息挤压监控.由于本小组 ...
- angular7一周学习
ng new xxx 创建一个项目 ng serve --open 执行一个项目 angular 使用socket.io 报错 找到polyfills.ts添加 (window as any).glo ...
- ASP.NET MVC 常用路由总结
1.URL模式 路由系统用一组路由来实现它的功能,这些路由共同组成了应用系统URL架构或方案,这种URL架构是应用程序能够识别并能对之做出响应的一组URL,当处理一个输入 请求时,路由系统的工作是将这 ...
- [转]REMOTE_ADDR,HTTP_CLIENT_IP,HTTP_X_FORWARDED_FOR
午睡一觉醒来,突然想伪造IP地址.搜了一下,Mark. 源地址:http://www.cnblogs.com/lmule/archive/2010/10/15/1852020.html ------- ...
- BZOJ.3631.[JLOI2014]松鼠的新家(树上差分)
题目链接 树剖/差分裸题.. //28260kb 584ms #include <cstdio> #include <cctype> #include <algorith ...
- C++ 线段树—模板&总结
在信息学竞赛中,经常遇到这样一类问题:这类问题通常可以建模成数轴上的问题或是数列的问题,具体的操作一般是每次对数轴上的一个区间或是数列中的连续若干个数进行一种相同的处理.常规的做法一般依托于线性表这种 ...
- pythonweb服务器编程(四)
Web动态服务器-1 #coding=utf-8 import socket import sys from multiprocessing import Process import re clas ...
- yii2 数据提供者 dataProvider
数据提供者 dataProvider $dataProvider = new ActiveDataProvider([ 'query' => $query, // 如何来取得数据 'pagina ...
- chardet查看字符串的编码(非常好用)
chardet不是python自带的包需要手动安装 chardet安装命令(dos下): pip install chardet 或: pip.exe install chardet 案例: > ...