问题描述
我正在尝试在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行中:
在Connector.php第68行中:
在Connector.php第68行中:
能帮我吗?在其他任何地方,我都没有找到解决此问题的任何方法.
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]服务器向客户端发送了未知的字符集.请向开发商报告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!