Skip to content

Instantly share code, notes, and snippets.

@wahyudibo
Last active February 11, 2019 15:40
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wahyudibo/66f1f348f762e3e3c0b3272beb0b6e31 to your computer and use it in GitHub Desktop.
Save wahyudibo/66f1f348f762e3e3c0b3272beb0b6e31 to your computer and use it in GitHub Desktop.
Turn off mysql 5.7 strict mode

Turn off MySQL 5.7 Strict Mode Globally

  • Check mysql mode SELECT @@sql_mode;
  • Add this snippet to /etc/mysql/my.cnf or if you install mysql via homebrew (MAC OS), you need to copy my.cnf with cp $(brew --prefix mysql)/support-files/my-default.cnf /usr/local/etc/my.cnf
[mysqld]
# Default : STRICT_TRANS_TABLES,ONLY_FULL_GROUP_BY,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
sql_mode = ""
  • Restart mysql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment