Skip to content

Instantly share code, notes, and snippets.

@creeek
Created October 22, 2014 01:34
Show Gist options
  • Save creeek/011412ee7c683e594883 to your computer and use it in GitHub Desktop.
Save creeek/011412ee7c683e594883 to your computer and use it in GitHub Desktop.
ERROR 2006 (HY000) at line xxx: MySQL server has gone away

ERROR 2006 (HY000): MySQL server has gone away

  • Just in case, to check variables you can use
$> mysqladmin variables -u user -p

This will display the current variables, in this case max_allowed_packet, and as someone said in another answer you can set it temporarily with

$> mysql -u user -p 
mysql> SET GLOBAL max_allowed_packet=1072731894
  • Adding this line into my.cnf file solves my problem.
max_allowed_packet=64M
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment