32 lines
533 B
Plaintext
32 lines
533 B
Plaintext
! Configuration File for keepalived
|
||
|
||
global_defs {
|
||
router_id MYSQL_MHA
|
||
}
|
||
|
||
vrrp_script chk_mysql_port {
|
||
script "{$SERVER_PATH}/keepalived/scripts/chk.sh mysql"
|
||
interval 2
|
||
weight –5
|
||
fall 2
|
||
rise 1
|
||
}
|
||
|
||
vrrp_instance VI_MYSQL {
|
||
state MASTER
|
||
interface {$ETH_XX}
|
||
virtual_router_id 51
|
||
priority 100
|
||
advert_int 1
|
||
authentication {
|
||
auth_type PASS
|
||
auth_pass 1111
|
||
}
|
||
virtual_ipaddress {
|
||
192.168.10.10
|
||
}
|
||
|
||
track_script {
|
||
chk_mysql_port
|
||
}
|
||
} |