Skip to content

Instantly share code, notes, and snippets.

@yidas
Last active January 31, 2023 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save yidas/b27cb8c08303a5d8d856f2abb1618afb to your computer and use it in GitHub Desktop.
Save yidas/b27cb8c08303a5d8d856f2abb1618afb to your computer and use it in GitHub Desktop.
[MySQL] Permanently change SQL Mode in MySQL (disable_strict_mode)

[MySQL] Permanently change SQL Mode in MySQL (disable_strict_mode)

Set into [mysqld] of MySQL config, for Ubuntu your could create a file /etc/mysql/conf.d/disable_strict_mode.cnf:

[mysqld]
sql_mode=NO_ENGINE_SUBSTITUTION

SQL mode example: STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

Then restart service for permanently effect.

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