MySQL5.5ã§æå³çã«ã¬ããªã±ã¼ã·ã§ã³ãé 延ãããpt-slave-delay
ãµã¼ãã¹éç¨ãã¦ããæã«ã¬ããªã±ã¼ã·ã§ã³é
延ãçºçãã¦ã¢ããªã±ã¼ã·ã§ã³ããã°ã£ãã
ã¨ããäºæ
ã«ãªããªãããã«ãéçºç°å¢ã®DBã¯é
延ãçºçããã¦ãé
延ãèæ
®ããã¢ããªã±ã¼ã·ã§ã³ãéçºã§ããããã«ãã¾ãã
â»MySQL5.6ã®å ´åã¯âãããã ãã§ãã
STOP SLAVE; CHANGE MASTER TO MASTER_DELAY=360; START SLAVE;
Percona Toolkit
ä»åã¯Percona Toolkitã®pt-slave-delayãå©ç¨ãã¾ãã
Percona Toolkitã®ã¤ã³ã¹ãã¼ã«
wget http://www.percona.com/redir/downloads/percona-toolkit/LATEST/RPM/percona-toolkit-2.2.5-2.noarch.rpm â»ä¾åããã±ã¼ã¸ yum install perl-DBI perl-DBD-MySQL perl-Time-HiRes perl-IO-Socket-SSL rpm -ivh percona-toolkit-2.2.4-1.noarch.rpm
å©ç¨æ¹æ³
pt-slave-delay --delay 1m --interval 10s --socket=/var/lib/mysql/mysql.sock -u root localhost
ä¸èº«ã¯èªåçã«é 延ç§æ°è¦ãªããSTOP SLAVEãSTART SLAVEãç¹°ãè¿ãã¦ããã ãã§ãã
Ctrl+Cã§å®è¡çµäºããã°ãåæã«STOP SLAVEã¯è§£é¤ããã¾ãã
-
- delayãé 延ãããç§æ°
- intervalãé 延ç¶æ ã®ç¢ºèªéé
ãã®ä»ã¯æ¥ç¶æ
å ±
詳細ãªãã·ã§ã³ã¯ãã¡ã
http://www.percona.com/doc/percona-toolkit/2.1/pt-slave-delay.html