purge_relay_logs
2023-07-121 [root@localhost ~]# yum -y install epel-release
[root@localhost ~]#yum install -y perl-DBD-MySQL perl-Config-Tiny perl-Log-Dispatch perl-Parallel-ForkManager perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker perl-CPAN
2 安装mha 每台服务器都需要:
[root@localhost ~]# wget https://qiniu.wsfnk.com/mha4mysql-node-0.58-0.el7.centos.noarch.rpm
[root@localhost ~]# rpm -ivh mha4mysql-node-0.58-0.el7.centos.noarch.rpm
3
which purge_relay_logs
/usr/bin/purge_relay_logs
4 rpm -qf /usr/bin/purge_relay_logs
mha4mysql-node-0.58-0.el7.centos.noarch
5 purge_relay_logs -h
purge_relay_logs --user=root --password=rootpass --host=127.0.0.1
Executing SET GLOBAL relay_log_purge=1; FLUSH LOGS; sleeping a few seconds so that SQL thread can delete older relay log files (if it keeps up); SET GLOBAL relay_log_purge=0; .. ok.
2023-07-12 10:08:13: All relay log purging operations succeeded.