How to Fix “MySQL Server Has Gone Away” Error

The mysqlslap connection test reported the following error:

mysqlslap: Cannot run query INSERT INTO t1 VALUES (73673339,'BN3152Gza4GW7atxJKACYwJqDbFynLxqc0kh30YTwgz3FktQ43XTrqJ4PQ25frn7kXhfXD8RuzN1j8Rf3y8ugKy6es3IbqPJM6ylCyD6xS7YcQCfHKZxYNvB7yTahm') ERROR : MySQL server has gone away

vi /etc/my.cnf  # Increase the value of the following configuration

max_allowed_packet = 100M

Restart MySQL:

service mysqld restart

Rerun the test, and it returns to normal.

<<<

Leave a Comment

Your email address will not be published.