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

Android App Version Update using the following cordova cli commands

75 inspirational quotes that will change your life

Retrieval Image From DataBase and Display on WebPage by Using Servlets.