I followed instructions here to see which configuration files MySQL looks for, here is the output.
Default options are read from the following files in the given order: /etc/my.cnf /etc/mysql/my.cnf /usr/etc/my.cnf ~/.my.cnf
I then made a ~/.my.cnf file as it suggested and put max_allowed_packet = 64M
in there in the group mysqld
. When I restart and do a mysql> show variables like 'max_allowed_packet';
it still has the value from the /etc/mysql/my.cnf
file and not my new overridden one. I did verify that MySQL is looking by running strace mysql
and it does a stat() and then open() on ~/.my.cnf but the variable never overrides.
Any ideas?