This is a follow up to this question MYSQL incorrect DATETIME format
How to get rid of STRICT_TRANS_TABLES once and for all?
mysql --help
reports the following configs:
Default options are read from the following files in the given order:
/etc/my.cnf /etc/mysql/my.cnf /usr/local/etc/my.cnf ~/.my.cnf
$ ls /etc/my.cnf /etc/mysql/my.cnf /usr/local/etc/my.cnf ~/.my.cnf
ls: /Users/pain/.my.cnf: No such file or directory
ls: /etc/mysql/my.cnf: No such file or directory
ls: /usr/local/etc/my.cnf: No such file or directory
/etc/my.cnf
$ cat /etc/my.cnf
[mysqld]
sql_mode=NO_ENGINE_SUBSTITUTION
But this doesn't help. I have some legacy code and each time I reboot the computer I have to launch mysql and change sql_mode.
Update
So I gave up on Homebrew-installed MySQL and downloaded it from from mysql.com. But that didn't help either. Following the answers here: How to fix `unknown variable 'sql-mode=ANSI'`? I have tried different variations of /etc/my.cnf
: [mysql]
, [mysqld]
, sql_mode
, sql-mode
– nothing helped.
set global sql_mode=''
:-) – Alyshaalysia