In the master server mysqld section of /etc/my.cnf you should have something like:
[mysqld]
server-id=1
log-bin
# so user changes do not replicate to the slaves
replicate-ignore-db=mysql
log-warnings
log-slave-updates
skip-bdb
On the master server run:
GRANT REPLICATION SLAVE ON *.* TO
mysql_slave@slaveserverip identified by 'somepassword'
In the slave MySQL server's /etc/my.cnf file you should have something like:
Note that the server ids need to be unique for all the servers in your mysql replication cluster.
On the master server run:
.
On the slave server's MySQL client use some of the values from that command to run the following:
CHANGE MASTER TO MASTER_HOST='masterserverip'
, MASTER_USER='mysql_slave', MASTER_PASSWORD='somepassword'
, MASTER_LOG_FILE='logfilenameperabove-bin.000003'
, MASTER_LOG_POS=perabove;SLAVE START;