Skip to content

Instantly share code, notes, and snippets.

@hughesmatias
Forked from larrybotha/A.markdown
Created July 31, 2017 19:45
Show Gist options
  • Save hughesmatias/44a2dda64d1de2df9783a1c35a23a255 to your computer and use it in GitHub Desktop.
Save hughesmatias/44a2dda64d1de2df9783a1c35a23a255 to your computer and use it in GitHub Desktop.
Mac OS Sierra MySQL my.conf

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;

courtesy of http://stackoverflow.com/a/18979736/895007

and add to /etc/my.cnf:

# /etc/my.cnf
max_allowed_packet=128M

MySQL throwing ERROR: SQLSTATE[42000]: Syntax error or access violation: 1067 Invalid default value for 'created'?

Add to /etc/my.cnf:

# /etc/my.cnf
sql_mode=NO_ENGINE_SUBSTITUTION

courtesy of http://stackoverflow.com/questions/20576917/how-do-i-disable-strict-trans-tables-for-a-homebrew-installed-mysql-server

# /etc/my.cnf
[mysqld]
max_allowed_packet=128M
wait_timeout=300
sql_mode=NO_ENGINE_SUBSTITUTION
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment