南非蚂蚁,著名Linux专家,知名IT作家。毕业于西安电子科技大学通信工程专业,爱好计算机,毕业后从事计算机行业。曾就职于新浪网、阿里云(万网),任职系统架构师。曾出版畅销书《循序渐进Linux》、《高性能Linux服务器构建实战》作者。
发布时间:2016-04-11 20:19:56
一、选择Percona Server、MariaDB还是MYSQL1、Mysql三种存储引擎MySQL提供了两种存储引擎:MyISAM和 InnoDB,MySQL4和5使用默认的MyISAM存储引擎。从MYSQL5.5开始,MySQL已将默认存储引擎从MyISAM更改为InnoDB。MyISAM没有提供事务支持,而InnoDB提供了事务支持。XtraDB是InnoDB存储引擎的增强版本,被设计用来更.........【阅读全文】
发布时间:2016-02-03 14:25:45
记得最早接触linux是在2000年,那个时候,还在上大学,一个同学从荷兰回来,带回来了一个Linux的拷贝版,记得版本还是Redhat6.2。曾经为安装一个系统让我们忘记疲劳,挑灯夜战,不亦乐乎。那时Linux的学习资料还很少,能够学习的书籍也不多,网上Linux技术社区也很少,就凭着Redhat6.2自带的几页使用说明开始了学习linux的.........【阅读全文】
exitgogo2016-02-03 15:17
saup007:双主MySQL配置Keepalived,2个角色都为BACKUP,
A节点:
vrrp_script chk_mysql_server {
#script "/opt/keepalived/script/chk_mysql_server.sh"
script "killall -0 mysqld"
interval 30 # 检测时间为30s
weight 21
}
vrrp_instance VI_1 {
state BACKUP
interface eth1
virtual_router_id 59
priority 100
advert_int 1
nopreempt
#mcas_src_ip 172.19.1.201
authentication {
auth_type PASS
auth_pass 1111
}
notify_master "/opt/keepalived/script/master.sh"
notify_backup "/opt/keepalived/script/backup.sh"
notify_fault "/opt/keepalived/script/fault.sh"
notify_stop "/opt/keepalived/script/stop.sh"
track_script {
chk_mysql_server
}
virtual_ipaddress {
172.19.1.249/24 dev eth1 scope global label eth1:0
}
}
B节点:
priority 90
#nopreempt
当停掉A的MySQL,正常切换到B,当把A MySQL启来后,vip依然在B,这个符合逻辑,但把A MySQL启来后,再去停掉B MySQL,VIP却没有飘移到A上,why?
vrrp_script chk_mysql_server {
#script "/opt/keepalived/script/chk_mysql_server.sh"
script "killall -0 mysqld"
interval 30 # 检测时间为30s
weight 21
}
这里面的权重设置有问题,修改weight值
saup0072015-08-27 15:16
双主MySQL配置Keepalived,2个角色都为BACKUP,
A节点:
vrrp_script chk_mysql_server {
#script "/opt/keepalived/script/chk_mysql_server.sh"
script "killall -0 mysqld"
interval 30 # 检测时间为30s
weight 21
}
vrrp_instance VI_1 {
state BACKUP
interface eth1
virtual_router_id 59
priority 100
advert_int 1
nopreempt
#mcas_src_ip 172.19.1.201
authentication {
auth_type PASS
auth_pass 1111
}
notify_master "/opt/keepalived/script/master.sh"
notify_backup "/opt/keepalived/script/backup.sh"
notify_fault "/opt/keepalived/script/fault.sh"
notify_stop "/opt/keepalived/script/stop.sh"
track_script {
chk_mysql_server
}
virtual_ipaddress {
172.19.1.249/24 dev eth1 scope global label eth1:0
}
}
B节点:
priority 90
#nopreempt
当停掉A的MySQL,正常切换到B,当把A MySQL启来后,vip依然在B,这个符合逻辑,但把A MySQL启来后,再去停掉B MySQL,VIP却没有飘移到A上,why?