SQLSTATE [HY000] [2054]服务器向客户端发送了未知的字符集.请向开发商报告 [英] SQLSTATE[HY000] [2054] Server sent charset unknown to the client. Please, report to the developers

查看:784
本文介绍了SQLSTATE [HY000] [2054]服务器向客户端发送了未知的字符集.请向开发商报告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在laravel中创建一个登录系统. 我已经更新了环境.文件名为kokodb的数据库. 但是,当我在cmd中运行此代码" php artisan migration "时,出现了以下错误:

I am trying to create a login system in laravel. I've updated env. file with a database called kokodb. However, when I run this code 'php artisan migrate' in cmd, I came up with the following error:

在Connection.php第647行中:

SQLSTATE [HY000] [2054]服务器向客户端发送了未知的字符集. 请向开发者报告(SQL: information_schema.tables其中table_schema = kokodb和 table_name =迁移)

SQLSTATE[HY000] [2054] Server sent charset unknown to t he client. Please, report to the developers (SQL: selec t * from information_schema.tables where table_schema = kokodb and table_name = migrations)

在Connector.php第68行中:

SQLSTATE [HY000] [2054]服务器向客户端发送了未知的字符集. 请向开发商报告

SQLSTATE[HY000] [2054] Server sent charset unknown to t he client. Please, report to the developers

在Connector.php第68行中:

PDO :: __ construct():服务器发送的字符集(255)未知 客户.请向开发商报告

PDO::__construct(): Server sent charset (255) unknown t o the client. Please, report to the developers

能帮我吗?在其他任何地方,我都没有找到解决此问题的任何方法.

Can you please help me. I did not find any solution to this problem anywhere else.

推荐答案

您正在使用哪个版本的PHP?

What version of PHP are you using?

根据PHP的bugtracker,此问题应从7.0.19、7.1.5和7.2.0开始修复.

According to PHP's bugtracker, this should be fixed as of 7.0.19, 7.1.5, and 7.2.0.

https://bugs.php.net/bug.php?id=74461

Arun的链接提到了将服务器字符集更改回utf8的解决方案,但是utf8mb4确实是更可取的,因为它提供了完全的unicode支持.

Arun's links mention a solution of changing the server charset back to utf8, but utf8mb4 really is preferable because it offers full unicode support.

这篇关于SQLSTATE [HY000] [2054]服务器向客户端发送了未知的字符集.请向开发商报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆