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

后端 未结 14 1595
温柔的废话
温柔的废话 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:46

    The official fix is finanlly out and you can find the details on the link:
    https://support.cpanel.net/hc/en-us/articles/360056772334/comments/360005577354


    To quickly fix it just connect via SSH and run

    sudo /scripts/autorepair fix_mariadb_show_grants_roles
    

    For users that have applied the previous workaround involving downgrading MariaDB. Be sure to unlock MariaDB to ensure it continues to receive the appropriate updates:

    yum versionlock clear
    /scripts/upcp
    
    0 讨论(0)
  • 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).

    0 讨论(0)
提交回复
热议问题