MySQL's high-availability scenarios typically include the following:Keepalived+ Dual master, Mha,mmm,heartbeat+drbd,pxc,galera ClusterThe more commonly used are keepalived+, MHA and PXC.For small companies, it is generally recommended to use
MySQL master database High Availability-Dual-master single-active failover Solution
Preface: (PS: Preface was added later when this article was modified.) Some bloggers raised some questions and opinions about this article and paid attention to it,
Preface: (PS: Preface is added when this article is modified for the second time.) Some bloggers have raised some questions and opinions about this article and have followed those of bloggers, it also prompted me to make this set of things more
MySQL's high-availability scenarios typically include the following:Keepalived+ Dual master, Mha,mmm,heartbeat+drbd,pxc,galera ClusterThe more commonly used are keepalived+, MHA and PXC.For small companies, it is generally recommended to use
#!/bin/bashif ls /backup | grep $ (date +%f) &> /dev/nullthen echo "Today is already backup" exit 1else if ls / | grep backup &> /dev/null then if [ - f /backup ] then mv /backup /$ (date +%t)
This article mainly introduces the shell script sharing of some practical functions of MySQL in Linux, including starting Memcached, binlog automatic cleanup, and repairing master-slave synchronization, for more information, see
Memcached startup
The code is as follows:Download: Https://gitee.com/LoongWang/shellrecycling.git1#/usr/bin/EnvBash2 3 4 #定义5 #定义回收站目录6Recyclingdir='/usr/local/recycling/'7 #定义回收站log文件8recyclinglog='/var/log/recyclinglog'9
#!/bin/bash#auto Backup any one or all db#by Zhaoyanfeng#2017-8-15 11:17:54#definedAll_db= ' mysql-uroot-p123456-e "show databases;" | Grep-v Database | Xargs-n 1 'Mysql_user=rootMysql_passwd=
Set the time[[email protected]/]# date-s "20171014 15:42:00"Saturday, October 14, 2017 15:42:00 CSTFormat time[[Email protected] ~]# DateSat Oct 09:07:29 CST 2017[Email protected] ~]# date +%y-%m-%d17-10-14[Email protected] ~]# date +%y-%m-%d2017-10-
There is a Web server in a company, the data is very important, but if the hard disk is spent, the data will be lost, now the leader requires you to make the data on the other servers to do a periodic scheduled backup, the requirements are as
??? Company Audit department required us to all the host system to add user behavior audit function, record user account login time and behavior information, I use a simple way to achieve the following, I briefly introduce the implementation of the
[[email protected] ~]# echo It is the time $ (clock)It is the time November 10, 2016 Thursday 18:20 38 sec -0.327027 secondsCommand substitution[[email protected] ~]# touch./file-$ (date +%f-%h-%m-%s). txt[[email protected] ~]# touch./file-$ (date +%
1. Full backup and incremental backup 1.1 full-scale backupFull-volume data is all the data in the database, and a full backup is the backup of all the data in the database.Back Up all libraries:mysqldump -uroot -p123456 -S /data/3306/mysql.sock -F -
Document directory
Use of pscp
Let's take a look at psftp.
Other optional sftp clients
With the popularization of Linux applications on servers, Linux system management is increasingly dependent on remote management. Putty is one of the
Comprehensive use of special variables and scriptsfirst, environment variables :ENV # #查看所有的环境变量Echo-e "1\n2" # #换行显示Echo-e "1\t2" # #在1和2之间加入tab显示Echo-e "\033[44;37;5m me\033[0m COOL" # #有颜色显示, "\033[" is the terminal escape character startEcho-e "$
#########################################//The following is an account that the lockout system does not need to logincp/etc/passwd/etc/passwd. ' Date +%f 'zhanghao= "ADM LP mail UUCP operator Games Gopher ftp Nobody nobody4 noaccess listen webservd
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.