Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save robsenshuu/ff242c57ae921689a13a9caa7d10c3ef to your computer and use it in GitHub Desktop.
Save robsenshuu/ff242c57ae921689a13a9caa7d10c3ef to your computer and use it in GitHub Desktop.
# If you installed mysql via homebrew and mysql gives you the error
# ERROR 1067 (42000) at line 22: Invalid default value for 'some_date_field'
# You must open the mysql config file located in /usr/local/etc/my.cnf and add the next line
sql_mode=ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
# After, you have to restar mysql and that's it
brew services restart mysql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment