符合中小企业对网站设计、功能常规化式的企业展示型网站建设
本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...
商城网站建设因基本功能的需求不同费用上面也有很大的差别...
手机微信网站开发、微信官网、微信商城网站...
相信很多做运维的小伙伴都会用到MySQL数据库,以下提供一个脚本与诸君分享。
沙湾ssl适用于网站、小程序/APP、API接口等需要进行数据传输应用场景,ssl证书未来市场广阔!成为创新互联公司的ssl证书销售渠道,可以享受市场价格4-6折优惠!如果有意向欢迎电话联系或者加微信:18982081108(备注:SSL证书合作)期待与您的合作!
#!/bin/bash
SCRIPT_DIR=$(dirname $0)
BACKUP_DIR="/data1/mysqlbackup"
BACKUP_DAYS=480
rm -rf ${BACKUP_DIR}/*
DB_IP=`/sbin/ifconfig -a|grep inet|grep -v 127.0.0.1|grep -v inet6|awk '{print $2}'|tr -d "addr:" |head -1`
BACKUP_TYPE='xtra_full'
for i in `ps -ef |grep port= |grep -v grep|cut -d "=" -f 10`
do
DB_PORT=$i
NEW_DIR="/data1/mysqlbackup/${DB_PORT}"
if [ -e "$NEW_DIR" ]
then
echo "$NEW_DIR was created"
else
mkdir $NEW_DIR
fi
BACKUP_TODAY="/data1/mysqlbackup/${DB_PORT}/${DB_IP}_`date +%Y%m%d%H%M`"
#find ${BACKUP_DIR} -mindepth 2 -type d -cmin +${BACKUP_DAYS} -exec rm -rf {} \;
/usr/bin/mysql -h227.0.0.1 -P${DB_PORT} -uroot -e"GRANT RELOAD, LOCK TABLES, REPLICATION CLIENT ON *.* TO 'mysqlbackup'@127.0.0.1 IDENTIFIED BY 'abc123'"
/usr/bin/mysql -h227.0.0.1 -P${DB_PORT} -uroot -e"grant replication slave on *.* to replica@'10.37.53.%' identified by '密码'"
/usr/bin/mysql -h227.0.0.1 -P${DB_PORT} -uroot -e"grant all on *.* to mha_user@'10.37.53.%' identified by '密码'"
/usr/bin/mysql -h227.0.0.1 -P${DB_PORT} -uroot -e"grant all on *.* to zabbix_monitor@'127.0.0.1' identified by '密码'"
innobackupex --user=mysqlbackup --password=abc123 --host=127.0.0.1 --port=${DB_PORT} --defaults-file=/etc/mysql/my${DB_PORT}.cnf --no-timestamp $BACKUP_TODAY 2>/var/log/mysql${DB_PORT}.log