SlideShare una empresa de Scribd logo
1 de 13
Descargar para leer sin conexión
MHA Failover 过程解析




                   DBA Team
                  二零一三年三月

                  文档修订版历史


     日期      版本      说明       作者    审阅

2013-03-27                    邱伟胜




                      1
目录


目录
1.MHA 场景:.................................................................................................................3
2.MHA 切换过程.............................................................................................................3
    2.1 Phase 1: Configuration Check Phase...................................................3
    2.2 Phase 2: Dead Master Shutdown Phase.................................................3
    2.3 Phase 3: Master Recovery Phase...........................................................3
    2.4 Phase 4: Slaves Recovery Phase...........................................................9
    2.5 Phase 5: New master cleanup phase...................................................12




                                                            2
1.MHA 场景:

在下面的集群中,       通过手工控制,     模拟出 master 和各个 slave 不一致。 master
                                                    如
上表 qwsh 有四条记录,而 10.0.0.75 上只有一条记录:
10.0.0.13 (current master)
 +--10.0.0.74
 +--10.0.0.11
 +--10.0.0.75

Server        Role                      Table   Column   Rows
10.0.0.13     Master                    Qwsh    Aa int   1,2,3,4
10.0.0.11     Slave                     Qwsh    Aa int   1,2,3
10.0.0.74     Slave(candidate master)   Qwsh    Aa int   1,2
10.0.0.75     slave                     Qwsh    Aa int   1




2.MHA 切换过程

以下通过 manual failover 来详细解析一下过程:


2.1 Phase 1: Configuration Check Phase..

主要是检查各节点的状态:
一是 dead 与 alive;
二是 Primary candidate for the new Master 等



2.2 Phase 2: Dead Master Shutdown Phase..

一是检查是否可以 ssh 到 Dead Master
二是对 Dead Master 做一些处理,如 Disable VIP,Shutdown 主机等




                                 3
2.3 Phase 3: Master Recovery Phase..

2.3.1 Phase 3.1: Getting Latest Slaves Phase..

根据各 slave 的同步情况得到 Latest slaves(mysql-bin.000034:250773)和
Oldest slaves(mysql-bin.000034:250405)



2.3.2 Phase 3.2: Saving Dead Master's Binlog Phase..

如果 Dead Master 仍是可以 ssh 到,  获取 lasted slave 与 master 之间的 bin log
(start mysql-bin.000034:250773)

save_binary_logs     --command=save      --start_file=mysql-bin.000034
--start_pos=250773                       --binlog_dir=/data/mysql/arch
--output_file=/var/tmp/saved_master_binlog_from_10.0.0.13_3306_201303
25143805.binlog        --handle_raw_binlog=1       --disable_log_bin=0
--manager_version=0.55

如下为对应的 bin log 的内容:
[root@db-13~]#                                            mysqlbinlog
/var/tmp/saved_master_binlog_from_10.0.0.13_3306_20130325143805.binlo
g
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003                                                           SET
@OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at 4
#130325 10:40:31 server id 1 end_log_pos 107 Start: binlog v 4, server
v 5.5.27-log created 130325 10:40:31 at startup
ROLLBACK/*!*/;
BINLOG '
H7lPUQ8BAAAAZwAAAGsAAAAAAAQANS41LjI3LWxvZwAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAA
AAAAAAAAAAAAAAAAAAAfuU9REzgNAAgAEgAEBAQEEgAAVAAEGggAAAAICAgCAA==
'/*!*/;
# at 107
#130325 14:18:47 server id 1      end_log_pos 250841             Query
thread_id=21     exec_time=0     error_code=0
SET TIMESTAMP=1364192327/*!*/;
SET @@session.pseudo_thread_id=21/*!*/;
                                  4
SET    @@session.foreign_key_checks=1,   @@session.sql_auto_is_null=0,
@@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
SET                              @@session.auto_increment_increment=1,
@@session.auto_increment_offset=1/*!*/;
/*!C utf8 *//*!*/;
SET
@@session.character_set_client=33,@@session.collation_connection=33,@
@session.collation_server=33/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
BEGIN
/*!*/;
# at 175
#130325 14:18:47 server id 1      end_log_pos 250930             Query
thread_id=21     exec_time=0     error_code=0
use test/*!*/;
SET TIMESTAMP=1364192327/*!*/;
insert into qwsh values(4)
/*!*/;
# at 264
#130325 14:18:47 server id 1 end_log_pos 250957          Xid = 2425
COMMIT/*!*/;
# at 291
#130325 14:19:42 server id 1 end_log_pos 250976          Stop
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;




2.3.3 Phase 3.3: Determining New Master Phase..

检查 latest slave 是否有所有的 relay log 用来修复其他的 slave(oldest pos:
mysql-bin.000034:250405)。然后根据候选规则,选出新的主库(会检查是否有
设置 candidate_master=1 和 no_master=1 等):

apply_diff_relay_logs --command=find --latest_mlf=mysql-bin.000034
--latest_rmlp=250773                   --target_mlf=mysql-bin.000034
--target_rmlp=250405        --server_id=3         --workdir=/var/tmp
--timestamp=20130325143805                    --manager_version=0.55

                                  5
--relay_log_info=/data/mysql/data/relay-log.info
--relay_dir=/data/mysql/data/



2.3.4 Phase 3.4: New Master Diff Log Generation Phase..

候选 master 与 lasted slave 比较,是否要生产差异 log (10.0.0.74 received
relay logs up to: mysql-bin.000034:250589 , the latest slave(10.0.0.11)
up to: mysql-bin.000034:250773 )

apply_diff_relay_logs   --command=generate_and_send    --scp_user=root
--scp_host=10.0.0.74                    --latest_mlf=mysql-bin.000034
--latest_rmlp=250773                    --target_mlf=mysql-bin.000034
--target_rmlp=250589                                     --server_id=3
--diff_file_readtolatest=/var/tmp/relay_from_read_to_latest_10.0.0.74
_3306_20130325143805.binlog                         --workdir=/var/tmp
--timestamp=20130325143805 --handle_raw_binlog=1 --disable_log_bin=0
--manager_version=0.55
--relay_log_info=/data/mysql/data/relay-log.info
--relay_dir=/data/mysql/data/

如下为对应的 bin log 的内容:
[root@db-11~]#mysqlbinlog
/var/tmp/relay_from_read_to_latest_10.0.0.74_3306_20130325143805.binl
og
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003                                                             SET
@OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at 4
#130325 11:03:52 server id 3 end_log_pos 107 Start: binlog v 4, server
v 5.5.27-log created 130325 11:03:52
BINLOG '
mL5PUQ8DAAAAZwAAAGsAAAAAAAQANS41LjI3LWxvZwAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAEzgNAAgAEgAEBAQEEgAAVAAEGggAAAAICAgCAA==
'/*!*/;
# at 107
#700101    8:00:00 server id 1       end_log_pos 0           Rotate to
mysql-bin.000034 pos: 107
# at 150
#130325 10:40:31 server id 1 end_log_pos 0     Start: binlog v 4, server

                                   6
v 5.5.27-log created 130325 10:40:31
BINLOG '
H7lPUQ8BAAAAZwAAAAAAAAAAAAQANS41LjI3LWxvZwAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAEzgNAAgAEgAEBAQEEgAAVAAEGggAAAAICAgCAA==
'/*!*/;
# at 253
#130325 14:12:19 server id 1      end_log_pos 250657             Query
thread_id=21     exec_time=0     error_code=0
SET TIMESTAMP=1364191939/*!*/;
SET @@session.pseudo_thread_id=21/*!*/;
SET    @@session.foreign_key_checks=1,   @@session.sql_auto_is_null=0,
@@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
SET                              @@session.auto_increment_increment=1,
@@session.auto_increment_offset=1/*!*/;
/*!C utf8 *//*!*/;
SET
@@session.character_set_client=33,@@session.collation_connection=33,@
@session.collation_server=33/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
BEGIN
/*!*/;
# at 321
#130325 14:12:19 server id 1      end_log_pos 250746             Query
thread_id=21     exec_time=0     error_code=0
use test/*!*/;
SET TIMESTAMP=1364191939/*!*/;
insert into qwsh values(3)
/*!*/;
# at 410
#130325 14:12:19 server id 1 end_log_pos 250773          Xid = 2424
COMMIT/*!*/;
# at 437
#130325 14:12:36 server id 3 end_log_pos 250938          Stop
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;




                                  7
2.3.5 Phase 3.5: Master Log Apply Phase..

一是 Waiting until all relay logs are applied。

二是合并 lasted slave 和 dead master 的日志,因为有些日志的 events 可能
不完整,合并过程中要检查:All apply target binary logs are concatinated
at /var/tmp/total_binlog_for_10.0.0.74_3306.20130325143805.binlog .

以下是对应的 log 内容:
[mysql@db-74                       ~]$                       mysqlbinlog
/var/tmp/total_binlog_for_10.0.0.74_3306.20130325143805.binlog
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003                                                              SET
@OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at 4
#130325 11:03:52 server id 3 end_log_pos 107 Start: binlog v 4, server
v 5.5.27-log created 130325 11:03:52
BINLOG '
mL5PUQ8DAAAAZwAAAGsAAAAAAAQANS41LjI3LWxvZwAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAEzgNAAgAEgAEBAQEEgAAVAAEGggAAAAICAgCAA==
'/*!*/;
# at 107
#700101     8:00:00 server id 1       end_log_pos 0           Rotate to
mysql-bin.000034 pos: 107
# at 150
#130325 10:40:31 server id 1 end_log_pos 0      Start: binlog v 4, server
v 5.5.27-log created 130325 10:40:31
BINLOG '
H7lPUQ8BAAAAZwAAAAAAAAAAAAQANS41LjI3LWxvZwAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAEzgNAAgAEgAEBAQEEgAAVAAEGggAAAAICAgCAA==
'/*!*/;
# at 253
#130325 14:12:19 server id 1      end_log_pos 250657                Query
thread_id=21     exec_time=0     error_code=0
SET TIMESTAMP=1364191939/*!*/;
SET @@session.pseudo_thread_id=21/*!*/;
SET    @@session.foreign_key_checks=1,    @@session.sql_auto_is_null=0,
@@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;

                                    8
SET                             @@session.auto_increment_increment=1,
@@session.auto_increment_offset=1/*!*/;
/*!C utf8 *//*!*/;
SET
@@session.character_set_client=33,@@session.collation_connection=33,@
@session.collation_server=33/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
BEGIN
/*!*/;
# at 321
#130325 14:12:19 server id 1     end_log_pos 250746             Query
thread_id=21    exec_time=0     error_code=0
use test/*!*/;
SET TIMESTAMP=1364191939/*!*/;
insert into qwsh values(3)
/*!*/;
# at 410
#130325 14:12:19 server id 1 end_log_pos 250773         Xid = 2424
COMMIT/*!*/;
# at 437
#130325 14:12:36 server id 3 end_log_pos 250938         Stop
# at 456
#130325 14:18:47 server id 1     end_log_pos 250841             Query
thread_id=21    exec_time=0     error_code=0
SET TIMESTAMP=1364192327/*!*/;
BEGIN
/*!*/;
# at 524
#130325 14:18:47 server id 1     end_log_pos 250930             Query
thread_id=21    exec_time=0     error_code=0
SET TIMESTAMP=1364192327/*!*/;
insert into qwsh values(4)
/*!*/;
# at 613
#130325 14:18:47 server id 1 end_log_pos 250957         Xid = 2425
COMMIT/*!*/;
# at 640
#130325 14:19:42 server id 1 end_log_pos 250976         Stop
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
                                  9
三是记录新的 master 的 log file 和 pos:
All other slaves should start replication from here. Statement should be:
CHANGE    MASTER    TO    MASTER_HOST='10.0.0.74',     MASTER_PORT=3306,
MASTER_LOG_FILE='mysql-bin.000003',                  MASTER_LOG_POS=475,
MASTER_USER='repl', MASTER_PASSWORD='xxx';

四是 Executing master IP activate script;
五是 Set read_only=0 on the new master




2.4 Phase 4: Slaves Recovery Phase..

2.4.1 Phase 4.1: Starting Parallel Slave Diff Log Generation Phase..

判断各个 slave 与 lastest slave 是否存在 relay log 差异,在 latest slave
上执行如下命令,生成差异 relay log 文件,并通过 scp 拷贝到对应的从库上:
(Server 10.0.0.75 received relay logs up to: mysql-bin.000034:250405.
Need to get diffs from the latest slave(10.0.0.11) up to:
mysql-bin.000034:250773)
apply_diff_relay_logs    --command=generate_and_send    --scp_user=root
--scp_host=10.0.0.75                     --latest_mlf=mysql-bin.000034
--latest_rmlp=250773                     --target_mlf=mysql-bin.000034
--target_rmlp=250405                                      --server_id=3
--diff_file_readtolatest=/var/tmp/relay_from_read_to_latest_10.0.0.75
_3306_20130325143805.binlog                          --workdir=/var/tmp
--timestamp=20130325143805 --handle_raw_binlog=1 --disable_log_bin=0
--manager_version=0.55
--relay_log_info=/data/mysql/data/relay-log.info
--relay_dir=/data/mysql/data/



2.4.2 Phase 4.2: Starting Parallel Slave Log Apply Phase..

一是 Waiting until all relay logs are applied

二是检查是否有最新的 relay log,然后合并后应用

10.0.0.11 有 lasted relay log:
                                   10
apply_diff_relay_logs        --command=apply       --slave_user='root'
--slave_host=10.0.0.11    --slave_ip=10.0.0.11       --slave_port=3306
--apply_files=/var/tmp/saved_master_binlog_from_10.0.0.13_3306_201303
25143805.binlog     --workdir=/var/tmp     --target_version=5.5.27-log
--timestamp=20130325143805 --handle_raw_binlog=1 --disable_log_bin=0
--manager_version=0.55 --slave_pass=xxx

10.0.0.75 没有最新的 relay log,需要合并 relay log 和 dead master 的 bin
log:
apply_diff_relay_logs        --command=apply       --slave_user='root'
--slave_host=10.0.0.75    --slave_ip=10.0.0.75       --slave_port=3306
--apply_files=/var/tmp/relay_from_read_to_latest_10.0.0.75_3306_20130
325143805.binlog,/var/tmp/saved_master_binlog_from_10.0.0.13_3306_201
30325143805.binlog    --workdir=/var/tmp   --target_version=5.5.27-log
--timestamp=20130325143805 --handle_raw_binlog=1 --disable_log_bin=0
--manager_version=0.55 --slave_pass=xxx

以下是对应 log 的内容:
[mysql@db-75                     data]$                     mysqlbinlog
/var/tmp/total_binlog_for_10.0.0.75_3306.20130325143805.binlog
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003                                                             SET
@OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
# at 4
#130325 11:03:52 server id 3 end_log_pos 107 Start: binlog v 4, server
v 5.5.27-log created 130325 11:03:52
BINLOG '
mL5PUQ8DAAAAZwAAAGsAAAAAAAQANS41LjI3LWxvZwAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAEzgNAAgAEgAEBAQEEgAAVAAEGggAAAAICAgCAA==
'/*!*/;
# at 107
#700101    8:00:00 server id 1       end_log_pos 0           Rotate to
mysql-bin.000034 pos: 107
# at 150
#130325 10:40:31 server id 1 end_log_pos 0     Start: binlog v 4, server
v 5.5.27-log created 130325 10:40:31
BINLOG '
H7lPUQ8BAAAAZwAAAAAAAAAAAAQANS41LjI3LWxvZwAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAEzgNAAgAEgAEBAQEEgAAVAAEGggAAAAICAgCAA==
'/*!*/;
                                   11
# at 253
#130325 14:09:57 server id 1      end_log_pos 250473             Query
thread_id=21     exec_time=0     error_code=0
SET TIMESTAMP=1364191797/*!*/;
SET @@session.pseudo_thread_id=21/*!*/;
SET    @@session.foreign_key_checks=1,   @@session.sql_auto_is_null=0,
@@session.unique_checks=1, @@session.autocommit=1/*!*/;
SET @@session.sql_mode=0/*!*/;
SET                              @@session.auto_increment_increment=1,
@@session.auto_increment_offset=1/*!*/;
/*!C utf8 *//*!*/;
SET
@@session.character_set_client=33,@@session.collation_connection=33,@
@session.collation_server=33/*!*/;
SET @@session.lc_time_names=0/*!*/;
SET @@session.collation_database=DEFAULT/*!*/;
BEGIN
/*!*/;
# at 321
#130325 14:09:57 server id 1      end_log_pos 250562             Query
thread_id=21     exec_time=0     error_code=0
use test/*!*/;
SET TIMESTAMP=1364191797/*!*/;
insert into qwsh values(2)
/*!*/;
# at 410
#130325 14:09:57 server id 1 end_log_pos 250589          Xid = 2423
COMMIT/*!*/;
# at 437
#130325 14:12:19 server id 1      end_log_pos 250657             Query
thread_id=21     exec_time=0     error_code=0
SET TIMESTAMP=1364191939/*!*/;
BEGIN
/*!*/;
# at 505
#130325 14:12:19 server id 1      end_log_pos 250746             Query
thread_id=21     exec_time=0     error_code=0
SET TIMESTAMP=1364191939/*!*/;
insert into qwsh values(3)
/*!*/;
# at 594
#130325 14:12:19 server id 1 end_log_pos 250773          Xid = 2424
COMMIT/*!*/;
                                  12
# at 621
#130325 14:12:36 server id 3 end_log_pos 250938        Stop
# at 640
#130325 14:18:47 server id 1     end_log_pos 250841            Query
thread_id=21    exec_time=0     error_code=0
SET TIMESTAMP=1364192327/*!*/;
BEGIN
/*!*/;
# at 708
#130325 14:18:47 server id 1     end_log_pos 250930            Query
thread_id=21    exec_time=0     error_code=0
SET TIMESTAMP=1364192327/*!*/;
insert into qwsh values(4)
/*!*/;
# at 797
#130325 14:18:47 server id 1 end_log_pos 250957        Xid = 2425
COMMIT/*!*/;
# at 824
#130325 14:19:42 server id 1 end_log_pos 250976        Stop
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;

三是 Executed CHANGE MASTER



2.5 Phase 5: New master cleanup phase..

Resetting slave info on the new master




                                 13

Más contenido relacionado

La actualidad más candente

제 8회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 8회 엑셈 수요 세미나 자료 연구컨텐츠팀제 8회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 8회 엑셈 수요 세미나 자료 연구컨텐츠팀EXEM
 
Stacki: Remove Commands
Stacki: Remove CommandsStacki: Remove Commands
Stacki: Remove CommandsStackIQ
 
Percona Live 2012PPT:mysql-security-privileges-and-user-management
Percona Live 2012PPT:mysql-security-privileges-and-user-managementPercona Live 2012PPT:mysql-security-privileges-and-user-management
Percona Live 2012PPT:mysql-security-privileges-and-user-managementmysqlops
 
L.A.M.P Installation Note --- CentOS 6.5
L.A.M.P Installation Note --- CentOS 6.5L.A.M.P Installation Note --- CentOS 6.5
L.A.M.P Installation Note --- CentOS 6.5William Lee
 
Troubleshooting MySQL Performance
Troubleshooting MySQL PerformanceTroubleshooting MySQL Performance
Troubleshooting MySQL PerformanceSveta Smirnova
 
제 6회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 6회 엑셈 수요 세미나 자료 연구컨텐츠팀제 6회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 6회 엑셈 수요 세미나 자료 연구컨텐츠팀EXEM
 
Introducing new SQL syntax and improving performance with preparse Query Rewr...
Introducing new SQL syntax and improving performance with preparse Query Rewr...Introducing new SQL syntax and improving performance with preparse Query Rewr...
Introducing new SQL syntax and improving performance with preparse Query Rewr...Sveta Smirnova
 
Drizzle to MySQL, Stress Free Migration
Drizzle to MySQL, Stress Free MigrationDrizzle to MySQL, Stress Free Migration
Drizzle to MySQL, Stress Free MigrationAndrew Hutchings
 
Preparse Query Rewrite Plugins
Preparse Query Rewrite PluginsPreparse Query Rewrite Plugins
Preparse Query Rewrite PluginsSveta Smirnova
 
Hardening Drupal setup
Hardening Drupal setupHardening Drupal setup
Hardening Drupal setupZeeland Family
 
Quick reference for HBase shell commands
Quick reference for HBase shell commandsQuick reference for HBase shell commands
Quick reference for HBase shell commandsRajkumar Asohan, PMP
 
Oracle 12c far sync standby instance
Oracle 12c far sync standby instanceOracle 12c far sync standby instance
Oracle 12c far sync standby instanceMonowar Mukul
 
OpenStack Swift - MSST 2011 Tutorial Day
OpenStack Swift - MSST 2011 Tutorial DayOpenStack Swift - MSST 2011 Tutorial Day
OpenStack Swift - MSST 2011 Tutorial DayJoshua McKenty
 
12c for Developers - Feb 2014
12c for Developers - Feb 201412c for Developers - Feb 2014
12c for Developers - Feb 2014Connor McDonald
 
A close encounter_with_real_world_and_odd_perf_issues
A close encounter_with_real_world_and_odd_perf_issuesA close encounter_with_real_world_and_odd_perf_issues
A close encounter_with_real_world_and_odd_perf_issuesRiyaj Shamsudeen
 

La actualidad más candente (19)

제 8회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 8회 엑셈 수요 세미나 자료 연구컨텐츠팀제 8회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 8회 엑셈 수요 세미나 자료 연구컨텐츠팀
 
Stacki: Remove Commands
Stacki: Remove CommandsStacki: Remove Commands
Stacki: Remove Commands
 
Percona Live 2012PPT:mysql-security-privileges-and-user-management
Percona Live 2012PPT:mysql-security-privileges-and-user-managementPercona Live 2012PPT:mysql-security-privileges-and-user-management
Percona Live 2012PPT:mysql-security-privileges-and-user-management
 
L.A.M.P Installation Note --- CentOS 6.5
L.A.M.P Installation Note --- CentOS 6.5L.A.M.P Installation Note --- CentOS 6.5
L.A.M.P Installation Note --- CentOS 6.5
 
Mysql56 replication
Mysql56 replicationMysql56 replication
Mysql56 replication
 
Troubleshooting MySQL Performance
Troubleshooting MySQL PerformanceTroubleshooting MySQL Performance
Troubleshooting MySQL Performance
 
제 6회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 6회 엑셈 수요 세미나 자료 연구컨텐츠팀제 6회 엑셈 수요 세미나 자료 연구컨텐츠팀
제 6회 엑셈 수요 세미나 자료 연구컨텐츠팀
 
Dtalk shell
Dtalk shellDtalk shell
Dtalk shell
 
Introducing new SQL syntax and improving performance with preparse Query Rewr...
Introducing new SQL syntax and improving performance with preparse Query Rewr...Introducing new SQL syntax and improving performance with preparse Query Rewr...
Introducing new SQL syntax and improving performance with preparse Query Rewr...
 
Drizzle to MySQL, Stress Free Migration
Drizzle to MySQL, Stress Free MigrationDrizzle to MySQL, Stress Free Migration
Drizzle to MySQL, Stress Free Migration
 
Preparse Query Rewrite Plugins
Preparse Query Rewrite PluginsPreparse Query Rewrite Plugins
Preparse Query Rewrite Plugins
 
Hardening Drupal setup
Hardening Drupal setupHardening Drupal setup
Hardening Drupal setup
 
Quick reference for HBase shell commands
Quick reference for HBase shell commandsQuick reference for HBase shell commands
Quick reference for HBase shell commands
 
Oracle 12c far sync standby instance
Oracle 12c far sync standby instanceOracle 12c far sync standby instance
Oracle 12c far sync standby instance
 
Solaris
SolarisSolaris
Solaris
 
OpenStack Swift - MSST 2011 Tutorial Day
OpenStack Swift - MSST 2011 Tutorial DayOpenStack Swift - MSST 2011 Tutorial Day
OpenStack Swift - MSST 2011 Tutorial Day
 
12c for Developers - Feb 2014
12c for Developers - Feb 201412c for Developers - Feb 2014
12c for Developers - Feb 2014
 
Sql2
Sql2Sql2
Sql2
 
A close encounter_with_real_world_and_odd_perf_issues
A close encounter_with_real_world_and_odd_perf_issuesA close encounter_with_real_world_and_odd_perf_issues
A close encounter_with_real_world_and_odd_perf_issues
 

Destacado

基于MHA的MySQL高可用方案
基于MHA的MySQL高可用方案基于MHA的MySQL高可用方案
基于MHA的MySQL高可用方案Louis liu
 
Infiniflash benchmark
Infiniflash benchmarkInfiniflash benchmark
Infiniflash benchmarkLouis liu
 
Introduction to Real Time Java
Introduction to Real Time JavaIntroduction to Real Time Java
Introduction to Real Time JavaDeniz Oguz
 
MySQL自动切换设计与实现
MySQL自动切换设计与实现MySQL自动切换设计与实现
MySQL自动切换设计与实现orczhou
 
IMCSummit 2015 - Day 2 IT Business Track - Drive IMC Efficiency with Flash E...
IMCSummit 2015 - Day 2  IT Business Track - Drive IMC Efficiency with Flash E...IMCSummit 2015 - Day 2  IT Business Track - Drive IMC Efficiency with Flash E...
IMCSummit 2015 - Day 2 IT Business Track - Drive IMC Efficiency with Flash E...In-Memory Computing Summit
 
Using preferred read groups in oracle asm michael ault
Using preferred read groups in oracle asm michael aultUsing preferred read groups in oracle asm michael ault
Using preferred read groups in oracle asm michael aultLouis liu
 
Think of oracle and mysql bind value
Think of oracle and mysql bind value Think of oracle and mysql bind value
Think of oracle and mysql bind value Louis liu
 
MyAWR another mysql awr
MyAWR another mysql awrMyAWR another mysql awr
MyAWR another mysql awrLouis liu
 
Nvmfs benchmark
Nvmfs benchmarkNvmfs benchmark
Nvmfs benchmarkLouis liu
 
MySQL 5.7 milestone
MySQL 5.7 milestoneMySQL 5.7 milestone
MySQL 5.7 milestoneLouis liu
 
Architecture of YHD
Architecture of YHDArchitecture of YHD
Architecture of YHDLouis liu
 
HBASE Performane Test
HBASE Performane TestHBASE Performane Test
HBASE Performane TestLouis liu
 
基于Mongodb的压力评测工具 ycsb的一些概括
基于Mongodb的压力评测工具 ycsb的一些概括基于Mongodb的压力评测工具 ycsb的一些概括
基于Mongodb的压力评测工具 ycsb的一些概括Louis liu
 
Q315 citi-conf-090915
Q315 citi-conf-090915Q315 citi-conf-090915
Q315 citi-conf-090915sandisk2015
 
How to study oracle by louis liu
How to study oracle by louis liu How to study oracle by louis liu
How to study oracle by louis liu Louis liu
 
Rapid Application Design in Financial Services
Rapid Application Design in Financial ServicesRapid Application Design in Financial Services
Rapid Application Design in Financial ServicesAerospike
 
Exadata training
Exadata trainingExadata training
Exadata trainingLouis liu
 
MySQL Tokudb engine benchmark
MySQL Tokudb engine benchmarkMySQL Tokudb engine benchmark
MySQL Tokudb engine benchmarkLouis liu
 

Destacado (20)

基于MHA的MySQL高可用方案
基于MHA的MySQL高可用方案基于MHA的MySQL高可用方案
基于MHA的MySQL高可用方案
 
Infiniflash benchmark
Infiniflash benchmarkInfiniflash benchmark
Infiniflash benchmark
 
Introduction to Real Time Java
Introduction to Real Time JavaIntroduction to Real Time Java
Introduction to Real Time Java
 
Mysql集群
Mysql集群Mysql集群
Mysql集群
 
MySQL自动切换设计与实现
MySQL自动切换设计与实现MySQL自动切换设计与实现
MySQL自动切换设计与实现
 
IMCSummit 2015 - Day 2 IT Business Track - Drive IMC Efficiency with Flash E...
IMCSummit 2015 - Day 2  IT Business Track - Drive IMC Efficiency with Flash E...IMCSummit 2015 - Day 2  IT Business Track - Drive IMC Efficiency with Flash E...
IMCSummit 2015 - Day 2 IT Business Track - Drive IMC Efficiency with Flash E...
 
Using preferred read groups in oracle asm michael ault
Using preferred read groups in oracle asm michael aultUsing preferred read groups in oracle asm michael ault
Using preferred read groups in oracle asm michael ault
 
Think of oracle and mysql bind value
Think of oracle and mysql bind value Think of oracle and mysql bind value
Think of oracle and mysql bind value
 
MyAWR another mysql awr
MyAWR another mysql awrMyAWR another mysql awr
MyAWR another mysql awr
 
Nvmfs benchmark
Nvmfs benchmarkNvmfs benchmark
Nvmfs benchmark
 
MySQL 5.7 milestone
MySQL 5.7 milestoneMySQL 5.7 milestone
MySQL 5.7 milestone
 
Architecture of YHD
Architecture of YHDArchitecture of YHD
Architecture of YHD
 
HBASE Performane Test
HBASE Performane TestHBASE Performane Test
HBASE Performane Test
 
基于Mongodb的压力评测工具 ycsb的一些概括
基于Mongodb的压力评测工具 ycsb的一些概括基于Mongodb的压力评测工具 ycsb的一些概括
基于Mongodb的压力评测工具 ycsb的一些概括
 
Q315 citi-conf-090915
Q315 citi-conf-090915Q315 citi-conf-090915
Q315 citi-conf-090915
 
How to study oracle by louis liu
How to study oracle by louis liu How to study oracle by louis liu
How to study oracle by louis liu
 
Rapid Application Design in Financial Services
Rapid Application Design in Financial ServicesRapid Application Design in Financial Services
Rapid Application Design in Financial Services
 
optimizing_ceph_flash
optimizing_ceph_flashoptimizing_ceph_flash
optimizing_ceph_flash
 
Exadata training
Exadata trainingExadata training
Exadata training
 
MySQL Tokudb engine benchmark
MySQL Tokudb engine benchmarkMySQL Tokudb engine benchmark
MySQL Tokudb engine benchmark
 

Similar a Mha procedure

Download presentation
Download presentationDownload presentation
Download presentationwebhostingguy
 
Multiple instances on linux
Multiple instances on linuxMultiple instances on linux
Multiple instances on linuxVasudeva Rao
 
Download presentation
Download presentationDownload presentation
Download presentationRachit Gaur
 
Download presentation531
Download presentation531Download presentation531
Download presentation531Indra Pratap
 
11thingsabout11g 12659705398222 Phpapp01
11thingsabout11g 12659705398222 Phpapp0111thingsabout11g 12659705398222 Phpapp01
11thingsabout11g 12659705398222 Phpapp01Karam Abuataya
 
11 Things About11g
11 Things About11g11 Things About11g
11 Things About11gfcamachob
 
Riding the Binlog: an in Deep Dissection of the Replication Stream
Riding the Binlog: an in Deep Dissection of the Replication StreamRiding the Binlog: an in Deep Dissection of the Replication Stream
Riding the Binlog: an in Deep Dissection of the Replication StreamJean-François Gagné
 
Mysql replication @ gnugroup
Mysql replication @ gnugroupMysql replication @ gnugroup
Mysql replication @ gnugroupJayant Chutke
 
Basic Knowledge on MySql Replication
Basic Knowledge on MySql ReplicationBasic Knowledge on MySql Replication
Basic Knowledge on MySql ReplicationTasawr Interactive
 
MySQL Replication Overview -- PHPTek 2016
MySQL Replication Overview -- PHPTek 2016MySQL Replication Overview -- PHPTek 2016
MySQL Replication Overview -- PHPTek 2016Dave Stokes
 
Multiple instances second method
Multiple instances second methodMultiple instances second method
Multiple instances second methodVasudeva Rao
 
MariaDB10.7_install_Ubuntu.docx
MariaDB10.7_install_Ubuntu.docxMariaDB10.7_install_Ubuntu.docx
MariaDB10.7_install_Ubuntu.docxNeoClova
 
Performance Schema for MySQL Troubleshooting
 Performance Schema for MySQL Troubleshooting Performance Schema for MySQL Troubleshooting
Performance Schema for MySQL TroubleshootingSveta Smirnova
 
MySQL 101 PHPTek 2017
MySQL 101 PHPTek 2017MySQL 101 PHPTek 2017
MySQL 101 PHPTek 2017Dave Stokes
 
HandlerSocket plugin for MySQL (English)
HandlerSocket plugin for MySQL (English)HandlerSocket plugin for MySQL (English)
HandlerSocket plugin for MySQL (English)akirahiguchi
 
Profiling the logwriter and database writer
Profiling the logwriter and database writerProfiling the logwriter and database writer
Profiling the logwriter and database writerEnkitec
 
Webinar: MariaDB Provides the Solution to Ease Multi-Source Replication
Webinar: MariaDB Provides the Solution to Ease Multi-Source ReplicationWebinar: MariaDB Provides the Solution to Ease Multi-Source Replication
Webinar: MariaDB Provides the Solution to Ease Multi-Source ReplicationWagner Bianchi
 

Similar a Mha procedure (20)

MySQL 5.1 Replication
MySQL 5.1 ReplicationMySQL 5.1 Replication
MySQL 5.1 Replication
 
Download presentation
Download presentationDownload presentation
Download presentation
 
Multiple instances on linux
Multiple instances on linuxMultiple instances on linux
Multiple instances on linux
 
Download presentation
Download presentationDownload presentation
Download presentation
 
Download presentation531
Download presentation531Download presentation531
Download presentation531
 
11thingsabout11g 12659705398222 Phpapp01
11thingsabout11g 12659705398222 Phpapp0111thingsabout11g 12659705398222 Phpapp01
11thingsabout11g 12659705398222 Phpapp01
 
11 Things About11g
11 Things About11g11 Things About11g
11 Things About11g
 
Riding the Binlog: an in Deep Dissection of the Replication Stream
Riding the Binlog: an in Deep Dissection of the Replication StreamRiding the Binlog: an in Deep Dissection of the Replication Stream
Riding the Binlog: an in Deep Dissection of the Replication Stream
 
Mysql replication @ gnugroup
Mysql replication @ gnugroupMysql replication @ gnugroup
Mysql replication @ gnugroup
 
Basic Knowledge on MySql Replication
Basic Knowledge on MySql ReplicationBasic Knowledge on MySql Replication
Basic Knowledge on MySql Replication
 
MySQL Replication Overview -- PHPTek 2016
MySQL Replication Overview -- PHPTek 2016MySQL Replication Overview -- PHPTek 2016
MySQL Replication Overview -- PHPTek 2016
 
Multiple instances second method
Multiple instances second methodMultiple instances second method
Multiple instances second method
 
MariaDB10.7_install_Ubuntu.docx
MariaDB10.7_install_Ubuntu.docxMariaDB10.7_install_Ubuntu.docx
MariaDB10.7_install_Ubuntu.docx
 
vBACD - Introduction to Opscode Chef - 2/29
vBACD - Introduction to Opscode Chef - 2/29vBACD - Introduction to Opscode Chef - 2/29
vBACD - Introduction to Opscode Chef - 2/29
 
Performance Schema for MySQL Troubleshooting
 Performance Schema for MySQL Troubleshooting Performance Schema for MySQL Troubleshooting
Performance Schema for MySQL Troubleshooting
 
MySQL 101 PHPTek 2017
MySQL 101 PHPTek 2017MySQL 101 PHPTek 2017
MySQL 101 PHPTek 2017
 
HandlerSocket plugin for MySQL (English)
HandlerSocket plugin for MySQL (English)HandlerSocket plugin for MySQL (English)
HandlerSocket plugin for MySQL (English)
 
Profiling the logwriter and database writer
Profiling the logwriter and database writerProfiling the logwriter and database writer
Profiling the logwriter and database writer
 
Operation outbreak
Operation outbreakOperation outbreak
Operation outbreak
 
Webinar: MariaDB Provides the Solution to Ease Multi-Source Replication
Webinar: MariaDB Provides the Solution to Ease Multi-Source ReplicationWebinar: MariaDB Provides the Solution to Ease Multi-Source Replication
Webinar: MariaDB Provides the Solution to Ease Multi-Source Replication
 

Más de Louis liu

Tcpcopy benchmark
Tcpcopy benchmarkTcpcopy benchmark
Tcpcopy benchmarkLouis liu
 
JK Log-Center architect
JK Log-Center architectJK Log-Center architect
JK Log-Center architectLouis liu
 
JKDB BACKUP Introduction
JKDB BACKUP IntroductionJKDB BACKUP Introduction
JKDB BACKUP IntroductionLouis liu
 
MySQL Oslayer performace optimization
MySQL  Oslayer performace optimizationMySQL  Oslayer performace optimization
MySQL Oslayer performace optimizationLouis liu
 
MySQL async message subscription platform
MySQL async message subscription platformMySQL async message subscription platform
MySQL async message subscription platformLouis liu
 
Jkcn MySQLDB 架构
Jkcn MySQLDB 架构Jkcn MySQLDB 架构
Jkcn MySQLDB 架构Louis liu
 
My sql fabric ha and sharding solutions
My sql fabric ha and sharding solutionsMy sql fabric ha and sharding solutions
My sql fabric ha and sharding solutionsLouis liu
 
NetApp ef540 SSD Storage Test
NetApp ef540 SSD Storage TestNetApp ef540 SSD Storage Test
NetApp ef540 SSD Storage TestLouis liu
 
Exadata best practice on E-commerce area
Exadata best practice on E-commerce area Exadata best practice on E-commerce area
Exadata best practice on E-commerce area Louis liu
 
MySQL 5.5&5.6 new features summary
MySQL 5.5&5.6 new features summaryMySQL 5.5&5.6 new features summary
MySQL 5.5&5.6 new features summaryLouis liu
 
Ssd gc review
Ssd gc reviewSsd gc review
Ssd gc reviewLouis liu
 
1号店数据库架构
1号店数据库架构1号店数据库架构
1号店数据库架构Louis liu
 
ION performance brief hp dl980-8b
ION performance brief   hp dl980-8bION performance brief   hp dl980-8b
ION performance brief hp dl980-8bLouis liu
 
Recent my sql_performance Test detail
Recent my sql_performance Test detailRecent my sql_performance Test detail
Recent my sql_performance Test detailLouis liu
 
Advanced tips of dbms statas
Advanced tips of dbms statasAdvanced tips of dbms statas
Advanced tips of dbms statasLouis liu
 
Optimizer in oracle 11g by wwf from ebay COC
Optimizer in oracle 11g by wwf from ebay COCOptimizer in oracle 11g by wwf from ebay COC
Optimizer in oracle 11g by wwf from ebay COCLouis liu
 
FusionIO iodrive2 vs LSI nytro vs VIRI Flashmax II
FusionIO  iodrive2 vs LSI nytro  vs VIRI Flashmax IIFusionIO  iodrive2 vs LSI nytro  vs VIRI Flashmax II
FusionIO iodrive2 vs LSI nytro vs VIRI Flashmax IILouis liu
 

Más de Louis liu (19)

Tcpcopy benchmark
Tcpcopy benchmarkTcpcopy benchmark
Tcpcopy benchmark
 
JK Log-Center architect
JK Log-Center architectJK Log-Center architect
JK Log-Center architect
 
Wdt Test
Wdt TestWdt Test
Wdt Test
 
JKDB BACKUP Introduction
JKDB BACKUP IntroductionJKDB BACKUP Introduction
JKDB BACKUP Introduction
 
MySQL Oslayer performace optimization
MySQL  Oslayer performace optimizationMySQL  Oslayer performace optimization
MySQL Oslayer performace optimization
 
MySQL async message subscription platform
MySQL async message subscription platformMySQL async message subscription platform
MySQL async message subscription platform
 
Jkcn MySQLDB 架构
Jkcn MySQLDB 架构Jkcn MySQLDB 架构
Jkcn MySQLDB 架构
 
My sql fabric ha and sharding solutions
My sql fabric ha and sharding solutionsMy sql fabric ha and sharding solutions
My sql fabric ha and sharding solutions
 
NetApp ef540 SSD Storage Test
NetApp ef540 SSD Storage TestNetApp ef540 SSD Storage Test
NetApp ef540 SSD Storage Test
 
Exadata best practice on E-commerce area
Exadata best practice on E-commerce area Exadata best practice on E-commerce area
Exadata best practice on E-commerce area
 
MySQL 5.5&5.6 new features summary
MySQL 5.5&5.6 new features summaryMySQL 5.5&5.6 new features summary
MySQL 5.5&5.6 new features summary
 
Ssd gc review
Ssd gc reviewSsd gc review
Ssd gc review
 
1号店数据库架构
1号店数据库架构1号店数据库架构
1号店数据库架构
 
Oracle dgha
Oracle dghaOracle dgha
Oracle dgha
 
ION performance brief hp dl980-8b
ION performance brief   hp dl980-8bION performance brief   hp dl980-8b
ION performance brief hp dl980-8b
 
Recent my sql_performance Test detail
Recent my sql_performance Test detailRecent my sql_performance Test detail
Recent my sql_performance Test detail
 
Advanced tips of dbms statas
Advanced tips of dbms statasAdvanced tips of dbms statas
Advanced tips of dbms statas
 
Optimizer in oracle 11g by wwf from ebay COC
Optimizer in oracle 11g by wwf from ebay COCOptimizer in oracle 11g by wwf from ebay COC
Optimizer in oracle 11g by wwf from ebay COC
 
FusionIO iodrive2 vs LSI nytro vs VIRI Flashmax II
FusionIO  iodrive2 vs LSI nytro  vs VIRI Flashmax IIFusionIO  iodrive2 vs LSI nytro  vs VIRI Flashmax II
FusionIO iodrive2 vs LSI nytro vs VIRI Flashmax II
 

Último

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 

Último (20)

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 

Mha procedure

  • 1. MHA Failover 过程解析 DBA Team 二零一三年三月 文档修订版历史 日期 版本 说明 作者 审阅 2013-03-27 邱伟胜 1
  • 2. 目录 目录 1.MHA 场景:.................................................................................................................3 2.MHA 切换过程.............................................................................................................3 2.1 Phase 1: Configuration Check Phase...................................................3 2.2 Phase 2: Dead Master Shutdown Phase.................................................3 2.3 Phase 3: Master Recovery Phase...........................................................3 2.4 Phase 4: Slaves Recovery Phase...........................................................9 2.5 Phase 5: New master cleanup phase...................................................12 2
  • 3. 1.MHA 场景: 在下面的集群中, 通过手工控制, 模拟出 master 和各个 slave 不一致。 master 如 上表 qwsh 有四条记录,而 10.0.0.75 上只有一条记录: 10.0.0.13 (current master) +--10.0.0.74 +--10.0.0.11 +--10.0.0.75 Server Role Table Column Rows 10.0.0.13 Master Qwsh Aa int 1,2,3,4 10.0.0.11 Slave Qwsh Aa int 1,2,3 10.0.0.74 Slave(candidate master) Qwsh Aa int 1,2 10.0.0.75 slave Qwsh Aa int 1 2.MHA 切换过程 以下通过 manual failover 来详细解析一下过程: 2.1 Phase 1: Configuration Check Phase.. 主要是检查各节点的状态: 一是 dead 与 alive; 二是 Primary candidate for the new Master 等 2.2 Phase 2: Dead Master Shutdown Phase.. 一是检查是否可以 ssh 到 Dead Master 二是对 Dead Master 做一些处理,如 Disable VIP,Shutdown 主机等 3
  • 4. 2.3 Phase 3: Master Recovery Phase.. 2.3.1 Phase 3.1: Getting Latest Slaves Phase.. 根据各 slave 的同步情况得到 Latest slaves(mysql-bin.000034:250773)和 Oldest slaves(mysql-bin.000034:250405) 2.3.2 Phase 3.2: Saving Dead Master's Binlog Phase.. 如果 Dead Master 仍是可以 ssh 到, 获取 lasted slave 与 master 之间的 bin log (start mysql-bin.000034:250773) save_binary_logs --command=save --start_file=mysql-bin.000034 --start_pos=250773 --binlog_dir=/data/mysql/arch --output_file=/var/tmp/saved_master_binlog_from_10.0.0.13_3306_201303 25143805.binlog --handle_raw_binlog=1 --disable_log_bin=0 --manager_version=0.55 如下为对应的 bin log 的内容: [root@db-13~]# mysqlbinlog /var/tmp/saved_master_binlog_from_10.0.0.13_3306_20130325143805.binlo g /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; # at 4 #130325 10:40:31 server id 1 end_log_pos 107 Start: binlog v 4, server v 5.5.27-log created 130325 10:40:31 at startup ROLLBACK/*!*/; BINLOG ' H7lPUQ8BAAAAZwAAAGsAAAAAAAQANS41LjI3LWxvZwAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAA AAAAAAAAAAAAAAAAAAAfuU9REzgNAAgAEgAEBAQEEgAAVAAEGggAAAAICAgCAA== '/*!*/; # at 107 #130325 14:18:47 server id 1 end_log_pos 250841 Query thread_id=21 exec_time=0 error_code=0 SET TIMESTAMP=1364192327/*!*/; SET @@session.pseudo_thread_id=21/*!*/; 4
  • 5. SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!C utf8 *//*!*/; SET @@session.character_set_client=33,@@session.collation_connection=33,@ @session.collation_server=33/*!*/; SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; # at 175 #130325 14:18:47 server id 1 end_log_pos 250930 Query thread_id=21 exec_time=0 error_code=0 use test/*!*/; SET TIMESTAMP=1364192327/*!*/; insert into qwsh values(4) /*!*/; # at 264 #130325 14:18:47 server id 1 end_log_pos 250957 Xid = 2425 COMMIT/*!*/; # at 291 #130325 14:19:42 server id 1 end_log_pos 250976 Stop DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; 2.3.3 Phase 3.3: Determining New Master Phase.. 检查 latest slave 是否有所有的 relay log 用来修复其他的 slave(oldest pos: mysql-bin.000034:250405)。然后根据候选规则,选出新的主库(会检查是否有 设置 candidate_master=1 和 no_master=1 等): apply_diff_relay_logs --command=find --latest_mlf=mysql-bin.000034 --latest_rmlp=250773 --target_mlf=mysql-bin.000034 --target_rmlp=250405 --server_id=3 --workdir=/var/tmp --timestamp=20130325143805 --manager_version=0.55 5
  • 6. --relay_log_info=/data/mysql/data/relay-log.info --relay_dir=/data/mysql/data/ 2.3.4 Phase 3.4: New Master Diff Log Generation Phase.. 候选 master 与 lasted slave 比较,是否要生产差异 log (10.0.0.74 received relay logs up to: mysql-bin.000034:250589 , the latest slave(10.0.0.11) up to: mysql-bin.000034:250773 ) apply_diff_relay_logs --command=generate_and_send --scp_user=root --scp_host=10.0.0.74 --latest_mlf=mysql-bin.000034 --latest_rmlp=250773 --target_mlf=mysql-bin.000034 --target_rmlp=250589 --server_id=3 --diff_file_readtolatest=/var/tmp/relay_from_read_to_latest_10.0.0.74 _3306_20130325143805.binlog --workdir=/var/tmp --timestamp=20130325143805 --handle_raw_binlog=1 --disable_log_bin=0 --manager_version=0.55 --relay_log_info=/data/mysql/data/relay-log.info --relay_dir=/data/mysql/data/ 如下为对应的 bin log 的内容: [root@db-11~]#mysqlbinlog /var/tmp/relay_from_read_to_latest_10.0.0.74_3306_20130325143805.binl og /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; # at 4 #130325 11:03:52 server id 3 end_log_pos 107 Start: binlog v 4, server v 5.5.27-log created 130325 11:03:52 BINLOG ' mL5PUQ8DAAAAZwAAAGsAAAAAAAQANS41LjI3LWxvZwAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAEzgNAAgAEgAEBAQEEgAAVAAEGggAAAAICAgCAA== '/*!*/; # at 107 #700101 8:00:00 server id 1 end_log_pos 0 Rotate to mysql-bin.000034 pos: 107 # at 150 #130325 10:40:31 server id 1 end_log_pos 0 Start: binlog v 4, server 6
  • 7. v 5.5.27-log created 130325 10:40:31 BINLOG ' H7lPUQ8BAAAAZwAAAAAAAAAAAAQANS41LjI3LWxvZwAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAEzgNAAgAEgAEBAQEEgAAVAAEGggAAAAICAgCAA== '/*!*/; # at 253 #130325 14:12:19 server id 1 end_log_pos 250657 Query thread_id=21 exec_time=0 error_code=0 SET TIMESTAMP=1364191939/*!*/; SET @@session.pseudo_thread_id=21/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!C utf8 *//*!*/; SET @@session.character_set_client=33,@@session.collation_connection=33,@ @session.collation_server=33/*!*/; SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; # at 321 #130325 14:12:19 server id 1 end_log_pos 250746 Query thread_id=21 exec_time=0 error_code=0 use test/*!*/; SET TIMESTAMP=1364191939/*!*/; insert into qwsh values(3) /*!*/; # at 410 #130325 14:12:19 server id 1 end_log_pos 250773 Xid = 2424 COMMIT/*!*/; # at 437 #130325 14:12:36 server id 3 end_log_pos 250938 Stop DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; 7
  • 8. 2.3.5 Phase 3.5: Master Log Apply Phase.. 一是 Waiting until all relay logs are applied。 二是合并 lasted slave 和 dead master 的日志,因为有些日志的 events 可能 不完整,合并过程中要检查:All apply target binary logs are concatinated at /var/tmp/total_binlog_for_10.0.0.74_3306.20130325143805.binlog . 以下是对应的 log 内容: [mysql@db-74 ~]$ mysqlbinlog /var/tmp/total_binlog_for_10.0.0.74_3306.20130325143805.binlog /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; # at 4 #130325 11:03:52 server id 3 end_log_pos 107 Start: binlog v 4, server v 5.5.27-log created 130325 11:03:52 BINLOG ' mL5PUQ8DAAAAZwAAAGsAAAAAAAQANS41LjI3LWxvZwAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAEzgNAAgAEgAEBAQEEgAAVAAEGggAAAAICAgCAA== '/*!*/; # at 107 #700101 8:00:00 server id 1 end_log_pos 0 Rotate to mysql-bin.000034 pos: 107 # at 150 #130325 10:40:31 server id 1 end_log_pos 0 Start: binlog v 4, server v 5.5.27-log created 130325 10:40:31 BINLOG ' H7lPUQ8BAAAAZwAAAAAAAAAAAAQANS41LjI3LWxvZwAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAEzgNAAgAEgAEBAQEEgAAVAAEGggAAAAICAgCAA== '/*!*/; # at 253 #130325 14:12:19 server id 1 end_log_pos 250657 Query thread_id=21 exec_time=0 error_code=0 SET TIMESTAMP=1364191939/*!*/; SET @@session.pseudo_thread_id=21/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; SET @@session.sql_mode=0/*!*/; 8
  • 9. SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!C utf8 *//*!*/; SET @@session.character_set_client=33,@@session.collation_connection=33,@ @session.collation_server=33/*!*/; SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; # at 321 #130325 14:12:19 server id 1 end_log_pos 250746 Query thread_id=21 exec_time=0 error_code=0 use test/*!*/; SET TIMESTAMP=1364191939/*!*/; insert into qwsh values(3) /*!*/; # at 410 #130325 14:12:19 server id 1 end_log_pos 250773 Xid = 2424 COMMIT/*!*/; # at 437 #130325 14:12:36 server id 3 end_log_pos 250938 Stop # at 456 #130325 14:18:47 server id 1 end_log_pos 250841 Query thread_id=21 exec_time=0 error_code=0 SET TIMESTAMP=1364192327/*!*/; BEGIN /*!*/; # at 524 #130325 14:18:47 server id 1 end_log_pos 250930 Query thread_id=21 exec_time=0 error_code=0 SET TIMESTAMP=1364192327/*!*/; insert into qwsh values(4) /*!*/; # at 613 #130325 14:18:47 server id 1 end_log_pos 250957 Xid = 2425 COMMIT/*!*/; # at 640 #130325 14:19:42 server id 1 end_log_pos 250976 Stop DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; 9
  • 10. 三是记录新的 master 的 log file 和 pos: All other slaves should start replication from here. Statement should be: CHANGE MASTER TO MASTER_HOST='10.0.0.74', MASTER_PORT=3306, MASTER_LOG_FILE='mysql-bin.000003', MASTER_LOG_POS=475, MASTER_USER='repl', MASTER_PASSWORD='xxx'; 四是 Executing master IP activate script; 五是 Set read_only=0 on the new master 2.4 Phase 4: Slaves Recovery Phase.. 2.4.1 Phase 4.1: Starting Parallel Slave Diff Log Generation Phase.. 判断各个 slave 与 lastest slave 是否存在 relay log 差异,在 latest slave 上执行如下命令,生成差异 relay log 文件,并通过 scp 拷贝到对应的从库上: (Server 10.0.0.75 received relay logs up to: mysql-bin.000034:250405. Need to get diffs from the latest slave(10.0.0.11) up to: mysql-bin.000034:250773) apply_diff_relay_logs --command=generate_and_send --scp_user=root --scp_host=10.0.0.75 --latest_mlf=mysql-bin.000034 --latest_rmlp=250773 --target_mlf=mysql-bin.000034 --target_rmlp=250405 --server_id=3 --diff_file_readtolatest=/var/tmp/relay_from_read_to_latest_10.0.0.75 _3306_20130325143805.binlog --workdir=/var/tmp --timestamp=20130325143805 --handle_raw_binlog=1 --disable_log_bin=0 --manager_version=0.55 --relay_log_info=/data/mysql/data/relay-log.info --relay_dir=/data/mysql/data/ 2.4.2 Phase 4.2: Starting Parallel Slave Log Apply Phase.. 一是 Waiting until all relay logs are applied 二是检查是否有最新的 relay log,然后合并后应用 10.0.0.11 有 lasted relay log: 10
  • 11. apply_diff_relay_logs --command=apply --slave_user='root' --slave_host=10.0.0.11 --slave_ip=10.0.0.11 --slave_port=3306 --apply_files=/var/tmp/saved_master_binlog_from_10.0.0.13_3306_201303 25143805.binlog --workdir=/var/tmp --target_version=5.5.27-log --timestamp=20130325143805 --handle_raw_binlog=1 --disable_log_bin=0 --manager_version=0.55 --slave_pass=xxx 10.0.0.75 没有最新的 relay log,需要合并 relay log 和 dead master 的 bin log: apply_diff_relay_logs --command=apply --slave_user='root' --slave_host=10.0.0.75 --slave_ip=10.0.0.75 --slave_port=3306 --apply_files=/var/tmp/relay_from_read_to_latest_10.0.0.75_3306_20130 325143805.binlog,/var/tmp/saved_master_binlog_from_10.0.0.13_3306_201 30325143805.binlog --workdir=/var/tmp --target_version=5.5.27-log --timestamp=20130325143805 --handle_raw_binlog=1 --disable_log_bin=0 --manager_version=0.55 --slave_pass=xxx 以下是对应 log 的内容: [mysql@db-75 data]$ mysqlbinlog /var/tmp/total_binlog_for_10.0.0.75_3306.20130325143805.binlog /*!40019 SET @@session.max_insert_delayed_threads=0*/; /*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/; DELIMITER /*!*/; # at 4 #130325 11:03:52 server id 3 end_log_pos 107 Start: binlog v 4, server v 5.5.27-log created 130325 11:03:52 BINLOG ' mL5PUQ8DAAAAZwAAAGsAAAAAAAQANS41LjI3LWxvZwAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAEzgNAAgAEgAEBAQEEgAAVAAEGggAAAAICAgCAA== '/*!*/; # at 107 #700101 8:00:00 server id 1 end_log_pos 0 Rotate to mysql-bin.000034 pos: 107 # at 150 #130325 10:40:31 server id 1 end_log_pos 0 Start: binlog v 4, server v 5.5.27-log created 130325 10:40:31 BINLOG ' H7lPUQ8BAAAAZwAAAAAAAAAAAAQANS41LjI3LWxvZwAAAAAAAAAAAAAAAAAAAAAAAAAAA AAAAAAA AAAAAAAAAAAAAAAAAAAAAAAAEzgNAAgAEgAEBAQEEgAAVAAEGggAAAAICAgCAA== '/*!*/; 11
  • 12. # at 253 #130325 14:09:57 server id 1 end_log_pos 250473 Query thread_id=21 exec_time=0 error_code=0 SET TIMESTAMP=1364191797/*!*/; SET @@session.pseudo_thread_id=21/*!*/; SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1/*!*/; SET @@session.sql_mode=0/*!*/; SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/; /*!C utf8 *//*!*/; SET @@session.character_set_client=33,@@session.collation_connection=33,@ @session.collation_server=33/*!*/; SET @@session.lc_time_names=0/*!*/; SET @@session.collation_database=DEFAULT/*!*/; BEGIN /*!*/; # at 321 #130325 14:09:57 server id 1 end_log_pos 250562 Query thread_id=21 exec_time=0 error_code=0 use test/*!*/; SET TIMESTAMP=1364191797/*!*/; insert into qwsh values(2) /*!*/; # at 410 #130325 14:09:57 server id 1 end_log_pos 250589 Xid = 2423 COMMIT/*!*/; # at 437 #130325 14:12:19 server id 1 end_log_pos 250657 Query thread_id=21 exec_time=0 error_code=0 SET TIMESTAMP=1364191939/*!*/; BEGIN /*!*/; # at 505 #130325 14:12:19 server id 1 end_log_pos 250746 Query thread_id=21 exec_time=0 error_code=0 SET TIMESTAMP=1364191939/*!*/; insert into qwsh values(3) /*!*/; # at 594 #130325 14:12:19 server id 1 end_log_pos 250773 Xid = 2424 COMMIT/*!*/; 12
  • 13. # at 621 #130325 14:12:36 server id 3 end_log_pos 250938 Stop # at 640 #130325 14:18:47 server id 1 end_log_pos 250841 Query thread_id=21 exec_time=0 error_code=0 SET TIMESTAMP=1364192327/*!*/; BEGIN /*!*/; # at 708 #130325 14:18:47 server id 1 end_log_pos 250930 Query thread_id=21 exec_time=0 error_code=0 SET TIMESTAMP=1364192327/*!*/; insert into qwsh values(4) /*!*/; # at 797 #130325 14:18:47 server id 1 end_log_pos 250957 Xid = 2425 COMMIT/*!*/; # at 824 #130325 14:19:42 server id 1 end_log_pos 250976 Stop DELIMITER ; # End of log file ROLLBACK /* added by mysqlbinlog */; /*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/; 三是 Executed CHANGE MASTER 2.5 Phase 5: New master cleanup phase.. Resetting slave info on the new master 13