IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changes between Version 16 and Version 17 of MySqlReplication


Ignore:
Timestamp:
Nov 7, 2014, 9:51:05 AM (12 years ago)
Author:
Serge CHASTEL
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • MySqlReplication

    v16 v17  
    1681681 row in set (0.00 sec)
    169169}}}
     170
     171= Create a slave from another one =
     172*) I assume that we want to create a mysql slave on host slave02 from a (running/functioning) slave named slave01
     173
     174*) Make sure that slave01 and slave02 both run the exact same version of mysql
     175
     176*) Stop the replication on slave01
     177{{{
     178mysql@slave01> STOP SLAVE;
     179}}}
     180
     181*) RSync the contents of /var/lib/mysql on slave01 to /var/lib/mysql.slave01 on slave02
     182{{{
     183shell> rsync -av root@slave01:/var/lib/mysql /var/lib/mysql.slave01
     184}}}
     185
     186*) Stop the mysql server on slave02 if it is running, backup /etc/mysql/my.cnf on slave02 and copy /etc/mysql/my.cnf from slave01 there
     187{{{
     188shell> mysqladmin -u root -p shutdown now
     189shell> cd /etc/mysql
     190shell> mv my.cnf my.cnf.before_rsync
     191shell> scp root@slave01:/etc/mysql/my.cnf .
     192}}}
     193
     194*) Edit /etc/mysql/my.cnf on slave02 and change the server-id.
     195The server-id value has to be a number, I usually use
    170196= Enjoy... =
    171197It might be necessary to tell the slave to ignore some updates: