I am setting up a mysql slave on a Fedora 16 system, and the
server_id is not being set properly. My
[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
systemctl restart mysqld.service,
show variables like "server_id" indicates that
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).
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?