I'm on a Mac, using MySQL workbench, which is telling me the location of my my.cnf file is in /etc/, where I'm editing it. I set the permission on that file with chmod a-w.
In that my.cnf file, I have the following:
sql-mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
Which is what I want. However, upon restarting MySQL and logging into its command line, I get this:
mysql> 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 |
1 row in set (0.00 sec)
Additional modes are being added. If I run the following (but not persistent) command:
set global sql_mode=NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES
;
This is what I'm seeing on console: mysql> SELECT @@sql_mode;
| @@sql_mode |
| STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION |
Exactly what I want.
Can anyone explain to me how/why these extra, unwanted sql modes are being added? And/or how I can get just these two modes to persist without the others?