微擎出错信息:

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的更多相关文章

  1. 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. ...

  2. 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 ...

  3. 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 ...

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

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

  5. 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 ...

  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. 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 ...

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

    错误: 解决方法:

  9. 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 ' ...

随机推荐

  1. Java大数统计-hdu1316

    题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1316 题目描述: 给你一个范围,问你在这个范围内有多少斐波拉契数. 代码实现: import java ...

  2. Webmin详细安装过程及问题解决

    管理系统是件艰巨的任务,创建用户账户,配置服务,检查日志,还有系统管理员必须面对的所有其他的职责,都使系统管理工作成为一个不小的负担.下面介绍一个叫webmin的软件,webmin软件安装后能让读者从 ...

  3. Sunscreen POJ - 3614(贪心)

    To avoid unsightly burns while tanning, each of the C (1 ≤ C ≤ 2500) cows must cover her hide with s ...

  4. hr相关的

    1.自我介绍? 2.为什么要离职?之前几家公司离职的原因分别是什么? 3.从上一家公司离职的原因? 4.目前就职的公司最大的收获是什么? 从上家公司到目前公司的最大收获是什么,要突出目标明确,在当前的 ...

  5. CF871D Paths

    link 题意: n个点的无向图,若$\gcd(x,y) \neq1​$则$(x,y)​$有边,统计$1\sim n​$构成的无向图两两点对最短路是之和是多少(两点不连通最短路记为0)?$n\leq ...

  6. 潭州课堂25班:Ph201805201 django 项目 第四课 项目搭建 课堂笔记)

    创建一用户,授予对这个 myblog 库的所有表的权限(.*),在任何 ip 地址中访问(@“%”), 刷新: 退出,用新创建的用户登录,并进入这个库, 在昨天创建的项目中,配置文件中 为了数据库的案 ...

  7. Apache JMeter5 设置中文

    Apache JMeter5 下载: apache-jmeter-5.0.zip apache-jmeter-5.0.tgz 注意:JMeter5需要Java8 以上,本文环境是Win7 64位 1. ...

  8. 关于不执行整个大项目而是执行其中一部分独立文件夹的时候的python运行方法

    这是项目的整个目录,如果是点击右键运行ic_kw_ks_func.py的话是会报ic_kw_ks_func.py里面import的那些其他路径下的类和函数找不到.而我们发现有个-m的python命令能 ...

  9. CSS_盒子模型

    2016-10-22 <css入门经典>第6章 1.每个HTML元素对应于一个显示盒子,但不是所有的元素都显示在屏幕上. 2.HTML元素显示为CSS显示盒子的真正方法称为“可视格式化方式 ...

  10. 微信小程序-添加手机联系人

    仅供参考 1,wxml: <view bindlongtap="phoneNumTap">{{phoneNum}}</view> 2,js: data = ...