Citrix Systems 4.5 Printer User Manual


 
Chapter 7. Configuring Cluster Management Server Set Up
28
loss. MySQL replication is implemented using a master/slave model. The master is the node that
the Management Servers are configured to use. The slave is a standby node that receives all write
operations from the master and applies them to a local, redundant copy of the database. The following
steps are a guide to implementing MySQL replication.
Note
Creating a replica is not a backup solution. You should develop a backup procedure for the
MySQL data that is distinct from replication.
1. Ensure that this is a fresh install with no data in the master.
2. Edit my.cnf on the master and add the following in the [mysqld] section below datadir.
log_bin=mysql-bin
server_id=1
The server_id must be unique with respect to other servers. The recommended way to achieve
this is to give the master an ID of 1 and each slave a sequential number greater than 1, so that the
servers are numbered 1, 2, 3, etc.
3. Restart the MySQL service:
# service mysqld restart
4. Create a replication account on the master and give it privileges. We will use the "cloud-repl" user
with the password "password". This assumes that master and slave run on the 172.16.1.0/24
network.
# mysql -u root
mysql> create user 'cloud-repl'@'172.16.1.%' identified by 'password';
mysql> grant replication slave on *.* TO 'cloud-repl'@'172.16.1.%';
mysql> flush privileges;
mysql> flush tables with read lock;
5. Leave the current MySQL session running.
6. In a new shell start a second MySQL session.
7. Retrieve the current position of the database.
# mysql -u root
mysql> show master status;
+------------------+----------+--------------+------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+------------------+----------+--------------+------------------+
| mysql-bin.000001 | 412 | | |
+------------------+----------+--------------+------------------+