Created
January 30, 2018 08:29
-
-
Save eblumstengel/b6a4ab3b5f874eb8702a0555e6a446db to your computer and use it in GitHub Desktop.
MySQL 5.7 - Disable strict mode / set global sql_mode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Add a config to keep everything clean: | |
| /etc/mysql/conf.d/disable_strict_mode.cnf | |
| Set specific SQL modes: | |
| [mysqld] | |
| sql_mode=IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION | |
| OR simply: | |
| [mysqld] | |
| sql_mode='' | |
| sudo service mysql restart | |
| Test to confirm SQL mode setting: | |
| SELECT @@GLOBAL.sql_mode; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment