Skip to content

Como eliminar o erro Mysql Gone Away How do I fix the error “Mysql Server has gone away”?

The MySQL server has gone away (error 2006) has two main causes and solutions:

  • Server timed out and closed the connection. To fix, check that wait_timeout mysql variable in your my.cnf configuration file is large enough.
  • Server dropped an incorrect or too large packet. If mysqld gets a packet that is too large or incorrect, it assumes that something has gone wrong with the client and closes the connection. To fix, you can increase the maximal packet size limit max_allowed_packet in my.cnf file, eg. set max_allowed_packet = 128M, then restart your MySQL server: sudo /etc/init.d/mysql restart

 

Source: https://matomo.org/faq/troubleshooting/faq_183/

One Comment

  1. LUIS MIGUEL TONELLI MARTINS LUIS MIGUEL TONELLI MARTINS

    you can just run in termina, how a query (to 1gb):

    SET GLOBAL max_allowed_packet=1073741824;

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.