Skip to content

Instantly share code, notes, and snippets.

@RoesWibowo
Created August 22, 2016 09:47
Show Gist options
  • Save RoesWibowo/62387e6f8ceeaeb22cc61f4a7b145e47 to your computer and use it in GitHub Desktop.
Save RoesWibowo/62387e6f8ceeaeb22cc61f4a7b145e47 to your computer and use it in GitHub Desktop.
Change MySQL mode (Homestead)
mysql -u homestead -psecret -e "select @@sql_mode"
+-------------------------------------------------------------------------------------------------------------------------------------------+
| @@sql_mode |
+-------------------------------------------------------------------------------------------------------------------------------------------+
| ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
+-------------------------------------------------------------------------------------------------------------------------------------------+
[mysqld]
# ... other stuff will probably be here
sql_mode = "STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
restart mysql
@tucq88
Copy link

tucq88 commented Apr 26, 2018

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