Sameer
Sameer

Reputation: 3526

Confused with homebrew version mysql and official mysql preferences pane on mac

I downloaded mysql for my Mac from official website 'mysql.com', then launched it on my server using preferences pane and as well as from command line using

sudo /usr/local/etc/mysql/support-files/mysql.server start

Its working good, but during my development process i want to change the sql_mode,because i am getting below error

sql_mode=only_full_group_by

Many of them said to change sql mode config in /usr/mysql/my.cnf, but unfortunately i don't see that directory on my mac, So i installed Homebrew version mysql ,this also not working.

My Problem is where I can find my.cnf file on my mac? now i am not using homebrew version of mysql, I'm using official mysql downloaded from mysql.com/downloads.

Upvotes: 1

Views: 317

Answers (2)

Sameer
Sameer

Reputation: 3526

Finally i got solution, i created new file inside /etc called my.cnf and set this as

[mysqld]
# Default : STRICT_TRANS_TABLES,ONLY_FULL_GROUP_BY,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
sql_mode = ""

Now its working great :) Thanks for your responses!

Upvotes: 0

Faisal Umair
Faisal Umair

Reputation: 391

Run mysql --help it will show you the config file that is being loaded.

Upvotes: 1

Related Questions