Database general error: 2006 MySQL server has gone away


This MySQL/MariaDB error:


Error: 2006 - MySQL server has gone away
This error is caused by an insufficiently large max_allowed_packet setting in your MySQL server's my.cnf file.

Solution: Increase max_allowed_packet variable.

Note: Make sure the variable is under [mysqld] section, not [mysql].

file path in linux OS : /etc/my.cnf

if you couldn't found the line in file simple add under the [mysqld] section

max_allowed_packet=64M



Note : Don't forgot to restart mysql and apache server
















 MySQL/MariaDB Restart



    sudo systemctl restart mariadb



apache server restart



   systemctl restart httpd

Comments

Popular posts from this blog

Why Mark Zuckerberg’s Choose 4

Error message when I run sudo: unable to resolve host (none)

Convert MBR to GPT