7

I'm trying to disable ONLY_FULL_GROUP_BY, NO_ZERO_IN_DATE, NO_ZERO_DATE in MAMP PRO mysql. I've changed my.cnf in mysql templates, restart mysql server but unfortunately it's still the same. So, what i'm doing wrong? How to fix? Screenshot of my.cnf and mysql state

Andrew
  • 671
  • 2
  • 8
  • 21

3 Answers3

16

Just faced this issue today. I'll leave an answer for the record. It's based in this article.

On MAMP PRO go to File > Edit Template > MySQL.

In the editor, find [mysqld] line. Beneath that line add the following:

sql_mode=STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

(applied to this particular question)

sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION

(this is what I actually used)

where to place the code

Cheers and keep coding.

grpaiva
  • 552
  • 1
  • 6
  • 20
2

You're using double quotes in your example. Use single quotes

sql_mode = ''
mmcglynn
  • 7,668
  • 16
  • 52
  • 76
0

In the current version of 6.4 (and probably others), do the following:

Edit > Open Template > MySQL -> Version (x)

Then, add the following:

[mysqld]
sql_mode=""

enter image description here

vr_driver
  • 1,867
  • 28
  • 39