MySQL not reading my.cnf in MAMP
Question
Running MAMP (not PRO) 2.0.5, MySQL 5.5.9, locally on OS X and I cannot get MySQL to read a my.cnf file.
I've tried throwing it in the following directories with no results:
/Applications/MAMP/conf /Applications/MAMP/Library /Applications/MAMP/db/mysql
On each attempt, I make sure to shutdown the server, move the file and server is then restarted, after which a quick check of SHOW VARIABLES
reveals no effect.
I'm using MAMPs my-small.cnf, renaming as my.cnf before copying over.
Any ideas as to what's going on?
Solution
Added skip-character-set-client-handshake
to the [mysqld] group of the my.cnf file.
# The MySQL server
[mysqld]
skip-character-set-client-handshake
collation_server=utf8_unicode_ci
character_set_server=utf8
My-small.cnf as supplied in "support files" does not contain this, subsequently my connection was overriding the values, causing me to think the file was not being read... newbie mistake.
Solution mentioned on the MySQL manual here.