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 上的通信数据包格式错误


基础教程推荐
- 带更新的 sqlite CTE 2022-01-01
- MySQL 5.7参照时间戳生成日期列 2022-01-01
- 如何在 CakePHP 3 中实现 INSERT ON DUPLICATE KEY UPDATE aka upsert? 2021-01-01
- 从字符串 TSQL 中获取数字 2021-01-01
- CHECKSUM 和 CHECKSUM_AGG:算法是什么? 2021-01-01
- 带有WHERE子句的LAG()函数 2022-01-01
- MySQL根据从其他列分组的值,对两列之间的值进行求和 2022-01-01
- ORA-01830:日期格式图片在转换整个输入字符串之前结束/选择日期查询的总和 2021-01-01
- while 在触发器内循环以遍历 sql 中表的所有列 2022-01-01
- 使用 VBS 和注册表来确定安装了哪个版本和 32 位 2021-01-01