这是
MYSQL incorrect DATETIME format这个问题的后续
如何摆脱STRICT_TRANS_TABLES一次又一次?
mysql –help报告以下配置:
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
但这没有帮助。我有一些遗留代码,每次我重新启动计算机,我必须启动mysql并更改sql_mode。
更新
所以我放弃了Homebrew安装的MySQL,并从mysql.com下载。但是也没有帮助。按照以下答案:How to fix `unknown variable ‘sql-mode=ANSI’`?我尝试过/etc/my.cnf的不同变体:[mysql],[mysqld],sql_mode,sql-mode – 没有任何帮助。