I am setting up a mysql slave on a Fedora 16 system, and the server_id is not being set properly. My /etc/my.cnf is:
[mysqld]
server-id=16
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
read-only = 1
symbolic-links=0
max_allowed_packet = 100000000
[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
However, after systemctl restart mysqld.service, show variables like "server_id" indicates that server_id is 0, which causes replication to fail.
/var/log/mysqld.log was last modified when I last restarted the server, but there are no log entries from then (I did the restart today, and the last entry is from yesterday).
Why doesn't server-id=16 work? Does it need to be set in some other file? Alternatively, is there a way to edit the systemd unit file such that mysqld starts with the --server-id= command line option, or get mysqld to run an SQL statement to set the server_id on startup?

1. The replication works whenserver_idon the slave is not0; the trouble is that the slaveserver_idis reset to0when the slave restarts. – cpast Dec 31 '12 at 2:51mysqld, then check/var/log/syslog(you may not have this) or/var/log/messagesto see if there is some error or warning messages on mysqld startup process. – John Siu Dec 31 '12 at 2:54my.cnf. – cpast Dec 31 '12 at 3:12my.cnf? Is it 777 now? maybe change it to 660 or 644, should be own byroot. – John Siu Dec 31 '12 at 3:15