MySQL - Persistent values in my.cnf
1) The format with dashes are for command line and with underscore in my.cnf and as global variable. Any of the following has to work (tested on Percona Server 5.6.16):

log-bin-trust-function-creators=1
log-bin-trust-function-creators
log_bin_trust_function_creators=1
log_bin_trust_function_creators


(since it's a boolean you don't need to specify =1)

2) You can use G, M, k just fine. MySQL will pick that up. If you have a wrong config it will complain won't just ignore it silently. 

3) Variable order doesn't matter with the obvious exception if you specify something twice under the same section. In that case the one coming later will override the previous value:

[mysqld]
innodb_buffer_pool_size = 1G
innodb_buffer_pool_size = 2G


With this the buffer pool size will be 2G.



From what you described it seems your server is not picking up your my.cnf at all. Check if you have the files at the right place:

[root@server ~]# $(which mysqld) --verbose --help | grep -A 1 "Default options"

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


Or another alternative:

[root@server ~]# timeout 3 sudo -u mysql strace $(which mysqld) 2&gt;&amp;1 | grep stat|grep cnf
stat("/etc/my.cnf", 0x7fff9e681280)     = -1 ENOENT (No such file or directory)
stat("/etc/mysql/my.cnf", {st_mode=S_IFREG|0644, st_size=5454, ...}) = 0
stat("/usr/etc/my.cnf", 0x7fff9e681280) = -1 ENOENT (No such file or directory)
stat("/var/lib/mysql/.my.cnf", 0x7fff9e681280) = -1 ENOENT (No such file or directory)
stat("/var/lib/mysql/.mylogin.cnf", 0x7fff9e681280) = -1 ENOENT (No such file or directory)