mha 自动failover 原创
自动failover
slave1:
stop slave io_thread slave2
stop slave io_thread server1:
create database sbtest;
/usr/local/bin/sysbench --test=/root/sysbench-0.5/sysbench/tests/db/oltp.lua --oltp-table-size=10000 --oltp-tables-count=1 --mysql-user=root --mysql-password=123 -- mysql-
host=10.24.220.232 --mysql-port=3306 --num-threads=4 --max-requests=0 --max-time=30 --report-interval=3 prepare
/usr/local/bin/sysbench --test=/root/sysbench-0.5/sysbench/tests/db/oltp.lua --oltp-table-size=10000 --oltp-tables-count=1 --mysql-user=root --mysql-password=123 -- mysql-
host=10.24.220.232 --mysql-port=3306 --num-threads=4 --max-requests=0 --max-time=30 --report-interval=3 run
slave2:
start slave io_thread slave1
start slave io_thread
server1
service mysql.server stop
Sun May :: - [warning] Global configuration file /etc/masterha_default.cnf not found. Skipping.
Sun May :: - [info] Reading application default configuration from /etc/masterha/app1.conf..
Sun May :: - [info] Reading server configuration from /etc/masterha/app1.conf..
Sun May :: - [warning] Global configuration file /etc/masterha_default.cnf not found. Skipping.
Sun May :: - [info] Reading application default configuration from /etc/masterha/app1.conf..
Sun May :: - [info] Reading server configuration from /etc/masterha/app1.conf..
:):
Sun May :: - [debug] Connected to: slave1(10.24.220.70:), user=root
Sun May :: - [debug] Number of slave worker threads on host slave1(10.24.220.70:):
Sun May :: - [debug] Connected to: slave2(10.169.214.33:), user=root
Sun May :: - [debug] Number of slave worker threads on host slave2(10.169.214.33:):
Sun May :: - [debug] Comparing MySQL versions..
Sun May :: - [debug] Comparing MySQL versions done.
Sun May :: - [debug] Connecting to servers done.
Sun May :: - [info] GTID failover mode =
Sun May :: - [info] Dead Servers:
Sun May :: - [info] Alive Servers:
Sun May :: - [info] server1(10.24.220.232:)
Sun May :: - [info] slave1(10.24.220.70:)
Sun May :: - [info] slave2(10.169.214.33:)
Sun May :: - [info] Alive Slaves:
Sun May :: - [info] slave1(10.24.220.70:) Version=5.7.-log (oldest major version between slaves) log-bin:enabled
Sun May :: - [info] GTID ON
Sun May :: - [debug] Relay log info repository: FILE
Sun May :: - [info] Replicating from 10.24.220.232(10.24.220.232:)
Sun May :: - [info] Primary candidate for the new Master (candidate_master is set)
Sun May :: - [info] slave2(10.169.214.33:) Version=5.7.-log (oldest major version between slaves) log-bin:enabled
Sun May :: - [info] GTID ON
Sun May :: - [debug] Relay log info repository: FILE
Sun May :: - [info] Replicating from 10.24.220.232(10.24.220.232:)
Sun May :: - [info] Not candidate for the new Master (no_master is set)
Sun May :: - [info] Current Alive Master: server1(10.24.220.232:)
Sun May :: - [info] Checking slave configurations..
Sun May :: - [info] Checking replication filtering settings..
Sun May :: - [info] binlog_do_db= , binlog_ignore_db=
Sun May :: - [info] Replication filtering check ok.
Sun May :: - [info] GTID (with auto-pos) is supported. Skipping all SSH and Node package checking.
Sun May :: - [info] Checking SSH publickey authentication settings on the current master..
Sun May :: - [debug] SSH connection test to server1, option -o StrictHostKeyChecking=no -o PasswordAuthentication=no -o BatchMode=yes -o ConnectTimeout=, timeout
Sun May :: - [info] HealthCheck: SSH to server1 is reachable.
Sun May :: - [info]
server1(10.24.220.232:) (current master)
+--slave1(10.24.220.70:)
+--slave2(10.169.214.33:) Sun May :: - [info] Checking master_ip_failover_script status:
Sun May :: - [info] /usr/local/bin/master_ip_failover --command=status --ssh_user=root --orig_master_host=server1 --orig_master_ip=10.24.220.232 --orig_master_port= IN SCRIPT TEST====/sbin/ifconfig eth0: down==/sbin/ifconfig eth0: 10.24.220.100/=== Checking the Status of the script.. OK
Sun May :: - [info] OK.
Sun May :: - [warning] shutdown_script is not defined.
Sun May :: - [debug] Disconnected from server1(10.24.220.232:)
Sun May :: - [debug] Disconnected from slave1(10.24.220.70:)
Sun May :: - [debug] Disconnected from slave2(10.169.214.33:)
Sun May :: - [debug] SSH check command: exit
Sun May :: - [info] Set master ping interval seconds.
Sun May :: - [info] Set secondary check script: /usr/bin/masterha_secondary_check -s 10.169.214.33 -s 10.24.220.70 --user=root --master_host=10.24.220.232 --master_port=
Sun May :: - [info] Starting ping health check on server1(10.24.220.232:)..
Sun May :: - [debug] Connected on master.
Sun May :: - [debug] Set short wait_timeout on master: seconds
Sun May :: - [debug] Trying to get advisory lock..
Sun May :: - [info] Ping(SELECT) succeeded, waiting until MySQL doesn't respond..
Sun May :: - [warning] Got error on MySQL select ping: (MySQL server has gone away)
Sun May :: - [info] Executing SSH check script: exit
Sun May :: - [debug] SSH connection test to server1, option -o StrictHostKeyChecking=no -o PasswordAuthentication=no -o BatchMode=yes -o ConnectTimeout=, timeout
Sun May :: - [info] Executing secondary network check script: /usr/bin/masterha_secondary_check -s 10.169.214.33 -s 10.24.220.70 --user=root --master_host=10.24.220.232 --master_port= --user=root --master_host=server1 --master_ip=10.24.220.232 --master_port= --master_user=root --master_password= --ping_type=SELECT
Sun May :: - [info] HealthCheck: SSH to server1 is reachable.
Monitoring server 10.169.214.33 is reachable, Master is not reachable from 10.169.214.33. OK.
Monitoring server 10.24.220.70 is reachable, Master is not reachable from 10.24.220.70. OK.
Sun May :: - [info] Master is not reachable from all other monitoring servers. Failover should start.
Sun May :: - [warning] Got error on MySQL connect: (Lost connection to MySQL server at 'reading initial communication packet', system error: )
Sun May :: - [warning] Connection failed time(s)..
Sun May :: - [warning] Got error on MySQL connect: (Lost connection to MySQL server at 'reading initial communication packet', system error: )
Sun May :: - [warning] Connection failed time(s)..
Sun May :: - [warning] Got error on MySQL connect: (Lost connection to MySQL server at 'reading initial communication packet', system error: )
Sun May :: - [warning] Connection failed time(s)..
Sun May :: - [warning] Master is not reachable from health checker!
Sun May :: - [warning] Master server1(10.24.220.232:) is not reachable!
Sun May :: - [warning] SSH is reachable.
Sun May :: - [info] Connecting to a master server failed. Reading configuration file /etc/masterha_default.cnf and /etc/masterha/app1.conf again, and trying to connect to all servers to check server status..
Sun May :: - [warning] Global configuration file /etc/masterha_default.cnf not found. Skipping.
Sun May :: - [info] Reading application default configuration from /etc/masterha/app1.conf..
Sun May :: - [info] Reading server configuration from /etc/masterha/app1.conf..
Sun May :: - [debug] Skipping connecting to dead master server1(10.24.220.232:).
Sun May :: - [debug] Connecting to servers..
Sun May :: - [debug] Connected to: slave1(10.24.220.70:), user=root
Sun May :: - [debug] Number of slave worker threads on host slave1(10.24.220.70:):
Sun May :: - [debug] Connected to: slave2(10.169.214.33:), user=root
Sun May :: - [debug] Number of slave worker threads on host slave2(10.169.214.33:):
Sun May :: - [debug] Comparing MySQL versions..
Sun May :: - [debug] Comparing MySQL versions done.
Sun May :: - [debug] Connecting to servers done.
Sun May :: - [info] GTID failover mode =
Sun May :: - [info] Dead Servers:
Sun May :: - [info] server1(10.24.220.232:)
Sun May :: - [info] Alive Servers:
Sun May :: - [info] slave1(10.24.220.70:)
Sun May :: - [info] slave2(10.169.214.33:)
Sun May :: - [info] Alive Slaves:
Sun May :: - [info] slave1(10.24.220.70:) Version=5.7.-log (oldest major version between slaves) log-bin:enabled
Sun May :: - [info] GTID ON
Sun May :: - [debug] Relay log info repository: FILE
Sun May :: - [info] Replicating from 10.24.220.232(10.24.220.232:)
Sun May :: - [info] Primary candidate for the new Master (candidate_master is set)
Sun May :: - [info] slave2(10.169.214.33:) Version=5.7.-log (oldest major version between slaves) log-bin:enabled
Sun May :: - [info] GTID ON
Sun May :: - [debug] Relay log info repository: FILE
Sun May :: - [info] Replicating from 10.24.220.232(10.24.220.232:)
Sun May :: - [info] Not candidate for the new Master (no_master is set)
Sun May :: - [info] Checking slave configurations..
Sun May :: - [info] Checking replication filtering settings..
Sun May :: - [info] Replication filtering check ok.
Sun May :: - [info] Master is down!
Sun May :: - [info] Terminating monitoring script.
Sun May :: - [info] Got exit code (Master dead).
Sun May :: - [info] MHA::MasterFailover version 0.56.
Sun May :: - [info] Starting master failover.
Sun May :: - [info]
Sun May :: - [info] * Phase : Configuration Check Phase..
Sun May :: - [info]
Sun May :: - [debug] Skipping connecting to dead master server1.
Sun May :: - [debug] Connecting to servers..
Sun May :: - [debug] Connected to: slave1(10.24.220.70:), user=root
Sun May :: - [debug] Number of slave worker threads on host slave1(10.24.220.70:):
Sun May :: - [debug] Connected to: slave2(10.169.214.33:), user=root
Sun May :: - [debug] Number of slave worker threads on host slave2(10.169.214.33:):
Sun May :: - [debug] Comparing MySQL versions..
Sun May :: - [debug] Comparing MySQL versions done.
Sun May :: - [debug] Connecting to servers done.
Sun May :: - [info] GTID failover mode =
Sun May :: - [info] Dead Servers:
Sun May :: - [info] server1(10.24.220.232:)
Sun May :: - [info] Checking master reachability via MySQL(double check)...
Sun May :: - [info] ok.
Sun May :: - [info] Alive Servers:
Sun May :: - [info] slave1(10.24.220.70:)
Sun May :: - [info] slave2(10.169.214.33:)
Sun May :: - [info] Alive Slaves:
Sun May :: - [info] slave1(10.24.220.70:) Version=5.7.-log (oldest major version between slaves) log-bin:enabled
Sun May :: - [info] GTID ON
Sun May :: - [debug] Relay log info repository: FILE
Sun May :: - [info] Replicating from 10.24.220.232(10.24.220.232:)
Sun May :: - [info] Primary candidate for the new Master (candidate_master is set)
Sun May :: - [info] slave2(10.169.214.33:) Version=5.7.-log (oldest major version between slaves) log-bin:enabled
Sun May :: - [info] GTID ON
Sun May :: - [debug] Relay log info repository: FILE
Sun May :: - [info] Replicating from 10.24.220.232(10.24.220.232:)
Sun May :: - [info] Not candidate for the new Master (no_master is set)
Sun May :: - [info] Starting GTID based failover.
Sun May :: - [info]
Sun May :: - [info] ** Phase : Configuration Check Phase completed.
Sun May :: - [info]
Sun May :: - [info] * Phase : Dead Master Shutdown Phase..
Sun May :: - [info]
Sun May :: - [info] Forcing shutdown so that applications never connect to the current master..
Sun May :: - [info] Executing master IP deactivation script:
Sun May :: - [info] /usr/local/bin/master_ip_failover --orig_master_host=server1 --orig_master_ip=10.24.220.232 --orig_master_port= --command=stopssh --ssh_user=root
Sun May :: - [debug] Stopping IO thread on slave2(10.169.214.33:)..
Sun May :: - [debug] Stopping IO thread on slave1(10.24.220.70:).. IN SCRIPT TEST====/sbin/ifconfig eth0: down==/sbin/ifconfig eth0: 10.24.220.100/=== Disabling the VIP on old master: server1
Sun May :: - [debug] Stop IO thread on slave2(10.169.214.33:) done.
Sun May :: - [debug] Stop IO thread on slave1(10.24.220.70:) done.
SIOCSIFFLAGS: Cannot assign requested address
Sun May :: - [info] done.
Sun May :: - [warning] shutdown_script is not set. Skipping explicit shutting down of the dead master.
Sun May :: - [info] * Phase : Dead Master Shutdown Phase completed.
Sun May :: - [info]
Sun May :: - [info] * Phase : Master Recovery Phase..
Sun May :: - [info]
Sun May :: - [info] * Phase 3.1: Getting Latest Slaves Phase..
Sun May :: - [info]
Sun May :: - [debug] Fetching current slave status..
Sun May :: - [debug] Fetching current slave status done.
Sun May :: - [info] The latest binary log file/position on all slaves is log.:
Sun May :: - [info] Retrieved Gtid Set: 191f7a9f-ffa2-11e5-a825-00163e00242a:-
Sun May :: - [info] Latest slaves (Slaves that received relay log files to the latest):
Sun May :: - [info] slave1(10.24.220.70:) Version=5.7.-log (oldest major version between slaves) log-bin:enabled
Sun May :: - [info] GTID ON
Sun May :: - [debug] Relay log info repository: FILE
Sun May :: - [info] Replicating from 10.24.220.232(10.24.220.232:)
Sun May :: - [info] Primary candidate for the new Master (candidate_master is set)
Sun May :: - [info] slave2(10.169.214.33:) Version=5.7.-log (oldest major version between slaves) log-bin:enabled
Sun May :: - [info] GTID ON
Sun May :: - [debug] Relay log info repository: FILE
Sun May :: - [info] Replicating from 10.24.220.232(10.24.220.232:)
Sun May :: - [info] Not candidate for the new Master (no_master is set)
Sun May :: - [info] The oldest binary log file/position on all slaves is log.:
Sun May :: - [info] Retrieved Gtid Set: 191f7a9f-ffa2-11e5-a825-00163e00242a:-
Sun May :: - [info] Oldest slaves:
Sun May :: - [info] slave1(10.24.220.70:) Version=5.7.-log (oldest major version between slaves) log-bin:enabled
Sun May :: - [info] GTID ON
Sun May :: - [debug] Relay log info repository: FILE
Sun May :: - [info] Replicating from 10.24.220.232(10.24.220.232:)
Sun May :: - [info] Primary candidate for the new Master (candidate_master is set)
Sun May :: - [info] slave2(10.169.214.33:) Version=5.7.-log (oldest major version between slaves) log-bin:enabled
Sun May :: - [info] GTID ON
Sun May :: - [debug] Relay log info repository: FILE
Sun May :: - [info] Replicating from 10.24.220.232(10.24.220.232:)
Sun May :: - [info] Not candidate for the new Master (no_master is set)
Sun May :: - [info]
Sun May :: - [info] * Phase 3.3: Determining New Master Phase..
Sun May :: - [info]
Sun May :: - [info] Searching new master from slaves..
Sun May :: - [info] Candidate masters from the configuration file:
Sun May :: - [info] slave1(10.24.220.70:) Version=5.7.-log (oldest major version between slaves) log-bin:enabled
Sun May :: - [info] GTID ON
Sun May :: - [debug] Relay log info repository: FILE
Sun May :: - [info] Replicating from 10.24.220.232(10.24.220.232:)
Sun May :: - [info] Primary candidate for the new Master (candidate_master is set)
Sun May :: - [info] Non-candidate masters:
Sun May :: - [info] slave2(10.169.214.33:) Version=5.7.-log (oldest major version between slaves) log-bin:enabled
Sun May :: - [info] GTID ON
Sun May :: - [debug] Relay log info repository: FILE
Sun May :: - [info] Replicating from 10.24.220.232(10.24.220.232:)
Sun May :: - [info] Not candidate for the new Master (no_master is set)
Sun May :: - [info] Searching from candidate_master slaves which have received the latest relay log events..
Sun May :: - [info] New master is slave1(10.24.220.70:)
Sun May :: - [info] Starting master failover..
Sun May :: - [info]
From:
server1(10.24.220.232:) (current master)
+--slave1(10.24.220.70:)
+--slave2(10.169.214.33:) To:
slave1(10.24.220.70:) (new master)
+--slave2(10.169.214.33:)
Sun May :: - [info]
Sun May :: - [info] * Phase 3.3: New Master Recovery Phase..
Sun May :: - [info]
Sun May :: - [info] Waiting all logs to be applied..
Sun May :: - [debug] Sql Thread Done: , Worker Thread done: , Ended workers:
Sun May :: - [debug] Sql Thread Done: , Worker Thread done: , Ended workers:
Sun May :: - [debug] Sql Thread Done: , Worker Thread done: , Ended workers:
Sun May :: - [debug] Sql Thread Done: , Worker Thread done: , Ended workers:
Sun May :: - [debug] Sql Thread Done: , Worker Thread done: , Ended workers:
Sun May :: - [debug] Sql Thread Done: , Worker Thread done: , Ended workers:
Sun May :: - [debug] Sql Thread Done: , Worker Thread done: , Ended workers:
Sun May :: - [debug] Sql Thread Done: , Worker Thread done: , Ended workers:
Sun May :: - [debug] Sql Thread Done: , Worker Thread done: , Ended workers:
Sun May :: - [debug] Sql Thread Done: , Worker Thread done: , Ended workers:
Sun May :: - [debug] Sql Thread Done: , Worker Thread done: , Ended workers:
Sun May :: - [debug] Sql Thread Done: , Worker Thread done: , Ended workers:
Sun May :: - [debug] Sql Thread Done: , Worker Thread done: , Ended workers:
Sun May :: - [debug] Sql Thread Done: , Worker Thread done: , Ended workers:
Sun May :: - [debug] Sql Thread Done: , Worker Thread done: , Ended workers:
Sun May :: - [debug] Sql Thread Done: , Worker Thread done: , Ended workers:
Sun May :: - [debug] Sql Thread Done: , Worker Thread done: , Ended workers:
Sun May :: - [debug] Sql Thread Done: , Worker Thread done: , Ended workers:
Sun May :: - [debug] Sql Thread Done: , Worker Thread done: , Ended workers:
Sun May :: - [debug] Sql Thread Done: , Worker Thread done: , Ended workers:
Sun May :: - [info] done.
Sun May :: - [debug] Stopping slave IO/SQL thread on slave1(10.24.220.70:)..
Sun May :: - [debug] done.
Sun May :: - [info] Getting new master's binlog name and position..
Sun May :: - [info] log.:
Sun May :: - [info] All other slaves should start replication from here. Statement should be: CHANGE MASTER TO MASTER_HOST='slave1 or 10.24.220.70', MASTER_PORT=, MASTER_AUTO_POSITION=, MASTER_USER='repl', MASTER_PASSWORD='xxx';
Sun May :: - [info] Master Recovery succeeded. File:Pos:Exec_Gtid_Set: log., , 191f7a9f-ffa2-11e5-a825-00163e00242a:-
Sun May :: - [info] Executing master IP activate script:
Sun May :: - [info] /usr/local/bin/master_ip_failover --command=start --ssh_user=root --orig_master_host=server1 --orig_master_ip=10.24.220.232 --orig_master_port= --new_master_host=slave1 --new_master_ip=10.24.220.70 --new_master_port= --new_master_user='root' --new_master_password=''
Unknown option: new_master_user
Unknown option: new_master_password IN SCRIPT TEST====/sbin/ifconfig eth0: down==/sbin/ifconfig eth0: 10.24.220.100/=== Enabling the VIP - 10.24.220.100/ on the new master - slave1
Sun May :: - [info] OK.
Sun May :: - [info] Setting read_only= on slave1(10.24.220.70:)..
Sun May :: - [info] ok.
Sun May :: - [info] ** Finished master recovery successfully.
Sun May :: - [info] * Phase : Master Recovery Phase completed.
Sun May :: - [info]
Sun May :: - [info] * Phase : Slaves Recovery Phase..
Sun May :: - [info]
Sun May :: - [info]
Sun May :: - [info] * Phase 4.1: Starting Slaves in parallel..
Sun May :: - [info]
Sun May :: - [info] -- Slave recovery on host slave2(10.169.214.33:) started, pid: . Check tmp log /var/log/masterha/app1/slave2_3306_20160515204944.log if it takes time..
Sun May :: - [info]
Sun May :: - [info] Log messages from slave2 ...
Sun May :: - [info]
Sun May :: - [info] Resetting slave slave2(10.169.214.33:) and starting replication from the new master slave1(10.24.220.70:)..
Sun May :: - [debug] Stopping slave IO/SQL thread on slave2(10.169.214.33:)..
Sun May :: - [debug] done.
Sun May :: - [info] Executed CHANGE MASTER.
Sun May :: - [debug] Starting slave IO/SQL thread on slave2(10.169.214.33:)..
Sun May :: - [debug] done.
Sun May :: - [info] Slave started.
Sun May :: - [info] gtid_wait(191f7a9f-ffa2-11e5-a825-00163e00242a:-) completed on slave2(10.169.214.33:). Executed events.
Sun May :: - [info] End of log messages from slave2.
Sun May :: - [info] -- Slave on host slave2(10.169.214.33:) started.
Sun May :: - [info] All new slave servers recovered successfully.
Sun May :: - [info]
Sun May :: - [info] * Phase : New master cleanup phase..
Sun May :: - [info]
Sun May :: - [info] Resetting slave info on the new master..
Sun May :: - [debug] Clearing slave info..
Sun May :: - [debug] Stopping slave IO/SQL thread on slave1(10.24.220.70:)..
Sun May :: - [debug] done.
Sun May :: - [debug] SHOW SLAVE STATUS shows new master does not replicate from anywhere. OK.
Sun May :: - [info] slave1: Resetting slave info succeeded.
Sun May :: - [info] Master failover to slave1(10.24.220.70:) completed successfully.
Sun May :: - [info] Deleted server1 entry from /etc/masterha/app1.conf .
Sun May :: - [debug] Disconnected from slave1(10.24.220.70:)
Sun May :: - [debug] Disconnected from slave2(10.169.214.33:)
Sun May :: - [info] ----- Failover Report ----- app1: MySQL Master failover server1(10.24.220.232:) to slave1(10.24.220.70:) succeeded Master server1(10.24.220.232:) is down! Check MHA Manager logs at monitor:/var/log/masterha/app1/manager.log for details. Started automated(non-interactive) failover.
Invalidated master IP address on server1(10.24.220.232:)
Selected slave1(10.24.220.70:) as a new master.
slave1(10.24.220.70:): OK: Applying all logs succeeded.
slave1(10.24.220.70:): OK: Activated master IP address.
slave2(10.169.214.33:): OK: Slave started, replicating from slave1(10.24.220.70:)
slave1(10.24.220.70:): Resetting slave info succeeded.
Master failover to slave1(10.24.220.70:) completed successfully.
mha 自动failover 原创的更多相关文章
- MHA自动Failover过程解析(updated) 转
允许转载, 转载时请以超链接形式标明文章原始出处和网站信息 http://www.mysqlsystems.com/2012/03/figure-out-process-of-autofailover ...
- MySQL高可用方案MHA自动Failover与手动Failover的实践及原理
集群信息 角色 IP地址 ServerID 类型 Master ...
- 【MySql】——MHA+GTID+failover+binlog-server+Atlas
一.环境准备 1.mysql-db01 #系统版本 [root@mysql-db01 ~]# cat /etc/redhat-release CentOS release 6.7 (Final) #内 ...
- MHA 安装过程 原创
root@monitor yum.repos.d]# cat CentOS-Base.repo [base]name=CentOS-$releasever - Basefailovermethod=p ...
- MHA手动切换 原创1(主故障)
MHA提供了3种方式用于实现故障转移,分别自动故障转移,需要启用MHA监控: 在无监控的情况下的手动故障转移以及基于在线手动切换. 三种方式可以应对MySQL主从故障的任意场景.本文主要描述在无监控的 ...
- 利用XAG在RAC环境下实现GoldenGate自动Failover
概述 在RAC环境下配置OGG,要想实现RAC节点故障时,OGG能自动的failover到正常节点,要保证两点: 1. OGG的checkpoint,trail,BR文件放置在共享的集群文件系统上,R ...
- Redis主从自动failover
Redis主从架构持久化存在一个问题,即前次测试的结论,持久化需要配置在主实例上才能跨越实例保证数据不丢失,这样以来主实例在持久化数据到硬 盘的过程中,势必会造成磁盘的I/O等待,经过实际测试,这个持 ...
- MHA自动切换流程
MHA的全名叫做mysql-master-ha,配置后可以在10-30秒内完成master自动切换,切换过程如下: 1. 检测master的状态,方法是一秒一次“ SELECT 1 As Value” ...
- MHA手动切换 原创4 (非交互式切换)
非交互式切换:不输 YES 或者 NO [root@monitor app1]# masterha_master_switch --conf=/etc/masterha/app1.conf --mas ...
随机推荐
- Selenium2Library系列 keywords 之 _SelectElementKeywords 之 get_selected_list_labels(self, locator)
def get_selected_list_labels(self, locator): """Returns the visible labels of selecte ...
- 从python run 和python unittest两种eclipse运行方式深入理解if __name__ == "__main__"
在写一个简单的python测试程序的时候,发现eclipse中Run as "Python run 和 Python unittest”结果不一样?为什么会不一样? 先贴一下代码段: # - ...
- Tomcat中的线程池StandardThreadExecutor
之所以今天讨论它,因为在motan的的NettyServer中利用它这个线程池可以作为业务线程池,它定制了一个自己的线程池.当然还是基于jdk中的ThreadExecutor中的构造方法和execut ...
- 机器学习中的数学(1)-回归(regression)、梯度下降(gradient descent)
版权声明: 本文由LeftNotEasy所有,发布于http://leftnoteasy.cnblogs.com.如果转载,请注明出处,在未经作者同意下将本文用于商业用途,将追究其法律责任. 前言: ...
- 百度,你家云管家能靠谱点不?替你脸红!Shame on you!
此文已提交百度云问题反馈, 坐等答复. 笔者最近下载某24+G分卷压缩文件, 24+G啊, 足足要下将近7个小时.满心欢喜的下载完却尼玛发现解压出错, 有6个文件无法解压?wrong password ...
- Form(表单)
使用$.fn.form.defaults重写默认值对象 form提供了各种方法来操作执行表单字段,比如:ajax提交, load, clear等等.当提交表单的时候可以调用validate方法检查表单 ...
- TreeMap实现原理
摘要 研究项目底层代码时,发现项目中的数据的缓存用的是TreeMap来实现对数据的缓存管理.本片博文就TreeMap的源码.原理以及用法做一个探究 在用TreeMap之前我们要对TreeMap有个整体 ...
- 第二百九十六天 how can I 坚持
今天果真好冷,至今遇到的最冷的一天,出去一趟,脸都快要冻瘫了. 感觉自己事真的多,找个对象还这事那事的,活该单身. 好愁人啊. 今天,魏中贺来北京,本来说的要明天聚聚,可是,都不给力啊,都不知道在忙啥 ...
- 第二百九十五天 how can i 坚持
买了个小米电话卡,写的让周六日送,非得今天给送来,浪费了1块钱.买回来还没法激活,这.. 昨天差点挂掉,今天感觉好多了,不过今天好冷,回来快冻死了. 今天啊,年终奖订下来了,没有想象的高 啊,有点小失 ...
- 【转】使用Auto Layout中的VFL(Visual format language)--代码实现自动布局
本文将通过简单的UI来说明如何用VFL来实现自动布局.在自动布局的时候避免不了使用代码来加以优化以及根据内容来实现不同的UI. 一:API介绍 NSLayoutConstraint API 1 2 3 ...