Skip to content

Instantly share code, notes, and snippets.

@nilandev
Last active January 24, 2023 04:18
Show Gist options
  • Save nilandev/1c3f38c8f20a10580c8f046fb9d9f8eb to your computer and use it in GitHub Desktop.
Save nilandev/1c3f38c8f20a10580c8f046fb9d9f8eb to your computer and use it in GitHub Desktop.

Fixing Mac OS Sierra MySQL Woes

MySQL throwing ERROR 2006 (HY000): MySQL server has gone away?

mysql -u root -p
# enter password

mysql > SET GLOBAL max_allowed_packet=1073741824;

And also add to /etc/my.cnf:

# /etc/my.cnf
max_allowed_packet=128M
@rendi-febrian
Copy link

thankyou alot

@yogithesymbian
Copy link

i dont have /etc/my.cnf . i use brew instead .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment