Mysql - which cnf file to update
By default I always do my changes at /etc/mysql/mysql.conf.d/mysqld.cnf to do not split my changes too much, although, both of those should work /etc/my.cnf /etc/mysql/my.cnf ~/.my.cnf, just don't forget restarting you mysql service.