MySQL went away errors

This means that the server timed out and closed the connection. Two most common reasons (and fixes) for the MySQL server has gone away (error 2006) are:

  1. Your wait_timeout variable in your MySQL my.cnf configuration file is not large enough. To fix: vi /etc/mysql/my.cnf, set wait_timeout = 600 seconds (you can tweak/decrease this value when error 2006 is gone), then service mysql restart.
  2. Server dropped an incorrect or too large packet. If MySQL gets a packet that is too large or incorrect, it assumes that something has gone wrong with the client and closes the connection. You can increase the maximal packet size limit by increasing the value of max_allowed_packet in my.cnf file. To fix: vi /etc/mysql/my.cnf, set max_allowed_packet = 64M (you can tweak/decrease this value when error 2006 is gone), then service mysql restart.

About vicki

Welcome to the Sovereign Republic of Vickistan. I am the President here. Lucky me! No taxes or laws yet. Lucky you!
This entry was posted in Linux, MySQL. Bookmark the permalink.