随笔分类 - 数据库相关
数据库相关知识
摘要:一 基础环境 主机名 系统版本 MySQL版本 主机IP Master01 CentOS 6.8 MySQL 5.6 172.24.8.10 Master02 CentOS 6.8 MySQL 5.6 172.24.8.11 VIP 172.24.8.12 Slave01 CentOS 6.8 My
阅读全文
摘要:1 vim /etc/keepalived/check_MySQL.sh 2 #!/bin/bash 3 pkill keepalived
阅读全文
摘要:1 vim /etc/keepalived/check_MySQL.sh 2 #!/bin/sh 3 #isok=$(sed -n '2p' /etc/keepalived/result.txt) 4 isok=$(/usr/local/mysql/bin/mysql -uroot -p123456 -e 'select 1' |sed -n '2p') 5 function erro...
阅读全文
摘要:1 vim /etc/keepalived/check_MySQL.sh 2 #vim #!/bin/bash 3 MYSQL=/usr/local/mysql/bin/mysql 4 MYSQL_HOST=localhost 5 MYSQL_USER=root 6 MYSQL_PASSWORD= 7 CHECK_TIME=3 8 #mysql is working MYSQL...
阅读全文
摘要:1 vim /etc/keepalived/check_MySQL.sh 2 #!/bin/bash 3 MYSQL=/usr/bin/mysql 4 MYSQL_HOST=localhost 5 MYSQL_USER=root 6 CHECK_COUNT=5 7 counter=1 8 while true 9 do 10 mysql -h $MYSQL_HO...
阅读全文
摘要:1 [root@Master02 ~]# vim /etc/keepalived/keepalived.conf 2 ! Configuration File for keepalived 3 global_defs { 4 notification_email { 5 acassen@firewa
阅读全文
摘要:1 [root@Master01 ~]# vim /etc/keepalived/keepalived.conf 2 ! Configuration File for keepalived 3 global_defs { 4 notification_email { 5 acassen@firewa
阅读全文
摘要:一 简介 MMM即Multi-Master Replication Manager for MySQL:mysql多主复制管理器,基于perl实现,关于mysql主主复制配置的监控、故障转移和管理的一套可伸缩的脚本套件(在任何时候只有一个节点可以被写入)。 MMM也能对从服务器进行读负载均衡,所以可
阅读全文