SQLSTATE[HY000]: General error: 1835 Malformed communication packet on LARAVEL(SQLSTATE [HY000]:一般错误:1835 LARAVEL 上的通信数据包格式错误)
问题描述
突然得到
SQLSTATE[HY000]: General error: 1835 Malformed communication packet (SQL: select * from tb_users
where (username
= 121211) limit 1)
SQLSTATE[HY000]: General error: 1835 Malformed communication packet (SQL: select * from
tb_users
where (username
= 121211) limit 1)
在 Laravel 上.
on Laravel.
我已经检查过了:MySQL: ERROR 2027 (HY000): Malformed packet,但情况似乎不同.
I already checked this: MySQL: ERROR 2027 (HY000): Malformed packet, but it seems a different case.
- 我之前使用 SSH 登录后成功登录 MySQL(使用:mysql -u -p).
- 我已成功从远程 PC 直接登录 MySQL(使用:mysql -h [IP] -u -p).
但是我的 Laravel 遇到了我之前提到的错误.有这方面的经验吗?
But my Laravel got the error I mentioned before. Any experience in this?
推荐答案
我所有运行 PHP 7.2 的 Laravel 应用程序都有这个错误,但运行 PHP 7.3 的应用程序没有.于是我把PHP版本改成了7.3,问题就解决了.(运行 Laravel 7)
All my Laravel apps running PHP 7.2 had this error but those running on PHP 7.3 did not. So I changed the PHP version to 7.3 and the problem was fixed. (Running Laravel 7)
这篇关于SQLSTATE [HY000]:一般错误:1835 LARAVEL 上的通信数据包格式错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:SQLSTATE [HY000]:一般错误:1835 LARAVEL 上的通信数据包格式错误


基础教程推荐
- 在多列上分布任意行 2021-01-01
- mysql选择动态行值作为列名,另一列作为值 2021-01-01
- MySQL 中的类型:BigInt(20) 与 Int(20) 2021-01-01
- 什么是 orradiag_<user>文件夹? 2022-01-01
- 如何在 SQL 中将 Float 转换为 Varchar 2021-01-01
- 二进制文件到 SQL 数据库 Apache Camel 2021-01-01
- oracle区分大小写的原因? 2021-01-01
- 表 './mysql/proc' 被标记为崩溃,应该修复 2022-01-01
- 在 MySQL 中:如何将表名作为存储过程和/或函数参数传递? 2021-01-01
- 如何根据该 XML 中的值更新 SQL 中的 XML 2021-01-01