SQLSTATE[HY000]: General error: 1835 Malformed communication packet on LARAVEL

后端 未结 14 1658
温柔的废话
温柔的废话 2020-11-29 09:45

Suddenly got

SQLSTATE[HY000]: General error: 1835 Malformed communication packet (SQL: select * from tb_users where (username =

14条回答
  •  感动是毒
    2020-11-29 10:47

    This sudden error message is caused by a MariaDB client upgrade, which appears to be incompatible with the PHP 7.2 version of php-mysqlnd; version 10.2.35 breaks it, but version 10.2.34 still works. With yum or dnf one can easily revert to the previous versions eg. with:

    su
    yum history
    yum history undo 440
    

    Temporary setting enabled=0 in /etc/yum.repo.d/mariadb.repo might also make sense.
    Upgrading to PHP 7.3 might still be the better option (while available).

提交回复
热议问题