Add MySQL.cnf file to Mac OS Homebrew MySQL Install

Problem

Installed MySQL using homebrew but this did not create a my.cnf file by default.

Solution

Copied the example of my.cnf file in the cellular mysql path (/usr/local/Cellar/mysql/5.x.xx/support-files) to (/etc) having added the sql_mode explained in the MySQL 5.7 customizations

 $ cp /usr/local/Cellar/mysql/5.7.17/support-files/my-default.cnf /etc/my.cnf 

Open the my.cnf and add the sql_code variable as explained in the MySQL 5.7 customizations post.

Sources

MySQL my.cnf location on OS X?

How do I find where MySQL is loading its config from?