摘要:
###主### server-id=1 log-bin=mysql-bin binlog-ignore-db=information_schemabinlog-ignore-db=performance_schemabinlog-ignore-db=mysql ###从### server-id=2 阅读全文
posted @ 2020-05-19 17:17
fives
阅读(108)
评论(0)
推荐(0)
摘要:
#!/bin/basha=(`cat shu |grep -v "192" |grep -v "127"`)b=$(cat shu |grep "192")c=$(cat shu |grep "127")####shu是一个ip文档###for i in ${a[@]}do iptables -I 阅读全文
posted @ 2020-05-19 17:09
fives
阅读(205)
评论(0)
推荐(0)
摘要:
#!/bin/basha=$((RANDOM%100))b=0echo $awhile :dolet b++read -ep "输入一个数" shu if [ $a -eq $shu ]; then echo "相等" break elif [ $a -gt $shu ]; then echo "小 阅读全文
posted @ 2020-05-19 17:07
fives
阅读(174)
评论(0)
推荐(0)
摘要:
#!/bin/bashbei(){da=`date +%F`read -ep "输入指定要备份的数据库名称" filemkdir -p /opt/$damysqldump -B $file > /opt/$da/$file.sql if [ $? -eq 0 ]; thenecho "备份成功" > 阅读全文
posted @ 2020-05-19 17:06
fives
阅读(258)
评论(0)
推荐(0)
摘要:
#!/bin/basha=$(mysql -e "show slave status\G" | awk '/Slave_IO_Running/ {print $2}')b=$(mysql -e "show slave status\G" | awk '/Slave_SQL_Running/ {pri 阅读全文
posted @ 2020-05-19 17:05
fives
阅读(1034)
评论(0)
推荐(0)
摘要:
#!/bin/bash #系统信息###system(){ xi=$(uname) echo "操作系统 $xi " version=`cat /etc/redhat-release` echo "操作系统版本 $version" nei=`uname -r` echo "操作系统内核 $nei" 阅读全文
posted @ 2020-05-19 17:03
fives
阅读(293)
评论(0)
推荐(0)
浙公网安备 33010602011771号