mysql 迁移7

2022-03-21 18:45:12 浏览数 (1)

修改zabbix统计数据过期时间

代码语言:javascript复制
[root@new-master mysql]# vim  /var/lib/zabbix/percona/scripts/get_mysql_stats_wrapper.sh
[root@new-master mysql]# grep 120  /var/lib/zabbix/percona/scripts/get_mysql_stats_wrapper.sh
    if [ `expr $TIMENOW - $TIMEFLM` -gt 120 ]; then
[root@new-master mysql]# 

修改之前是300,也就是5分钟,这个监控粒度太粗,所以改为120


安装percona-xtrabackup

代码语言:javascript复制
[root@slave01 percona56]# rpm -ivh  percona-xtrabackup-2.3.2-1.el6.x86_64.rpm
warning: percona-xtrabackup-2.3.2-1.el6.x86_64.rpm: Header V4 DSA/SHA1
Signature, key ID cd2efd2a: NOKEY
error: Failed dependencies:
	libev.so.4()(64bit) is needed by percona-xtrabackup-2.3.2-1.el6.x86_64
[root@slave01 percona56]# yum install libev
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.opencas.cn
 * epel: mirrors.opencas.cn
 * extras: mirror.bit.edu.cn
 * updates: mirrors.opencas.cn
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package libev.x86_64 0:4.03-3.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=========================================================================================================================
 Package                    Arch                        Version
Repository                 Size
=========================================================================================================================
Installing:
 libev                      x86_64                      4.03-3.el6
epel                      113 k

Transaction Summary
=========================================================================================================================
Install       1 Package(s)

Total download size: 113 k
Installed size: 151 k
Is this ok [y/N]: y
Downloading Packages:
libev-4.03-3.el6.x86_64.rpm
| 113 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
** Found 11 pre-existing rpmdb problem(s), 'yum check' output follows:
Percona-Server-devel-51-5.1.73-rel14.11.603.rhel6.x86_64 has missing requires
of libmysqlclient.so.16()(64bit)
Percona-Server-devel-51-5.1.73-rel14.11.603.rhel6.x86_64 has missing requires
of libmysqlclient_r.so.16()(64bit)
perl-DBD-MySQL-4.013-3.el6.x86_64 has missing requires of
libmysqlclient.so.16()(64bit)
perl-DBD-MySQL-4.013-3.el6.x86_64 has missing requires of
libmysqlclient.so.16(libmysqlclient_16)(64bit)
php-mysql-5.3.3-40.el6_6.x86_64 has missing requires of
libmysqlclient.so.16()(64bit)
php-mysql-5.3.3-40.el6_6.x86_64 has missing requires of
libmysqlclient.so.16(libmysqlclient_16)(64bit)
2:postfix-2.6.6-6.el6_5.x86_64 has missing requires of
libmysqlclient.so.16()(64bit)
2:postfix-2.6.6-6.el6_5.x86_64 has missing requires of
libmysqlclient.so.16(libmysqlclient_16)(64bit)
2:postfix-2.6.6-6.el6_5.x86_64 has missing requires of mysql-libs
sysbench-0.4.12-5.el6.x86_64 has missing requires of
libmysqlclient_r.so.16()(64bit)
sysbench-0.4.12-5.el6.x86_64 has missing requires of
libmysqlclient_r.so.16(libmysqlclient_16)(64bit)
  Installing : libev-4.03-3.el6.x86_64
1/1 
  Verifying  : libev-4.03-3.el6.x86_64
1/1 

Installed:
  libev.x86_64 0:4.03-3.el6                                                                                              

Complete!
[root@slave01 percona56]# rpm -ivh  percona-xtrabackup-2.3.2-1.el6.x86_64.rpm
warning: percona-xtrabackup-2.3.2-1.el6.x86_64.rpm: Header V4 DSA/SHA1
Signature, key ID cd2efd2a: NOKEY
Preparing...                ########################################### [100%]
	file /usr/bin/innobackupex from install of
percona-xtrabackup-2.3.2-1.el6.x86_64 conflicts with file from package
xtrabackup-1.6.7-356.rhel6.x86_64
	file /usr/bin/xtrabackup from install of
percona-xtrabackup-2.3.2-1.el6.x86_64 conflicts with file from package
xtrabackup-1.6.7-356.rhel6.x86_64
[root@slave01 percona56]# rpm -qa | grep backup
xtrabackup-1.6.7-356.rhel6.x86_64
[root@slave01 percona56]# rpm -e xtrabackup-1.6.7-356.rhel6.x86_64 
[root@slave01 percona56]# rpm -ivh  percona-xtrabackup-2.3.2-1.el6.x86_64.rpm
warning: percona-xtrabackup-2.3.2-1.el6.x86_64.rpm: Header V4 DSA/SHA1
Signature, key ID cd2efd2a: NOKEY
Preparing...                ########################################### [100%]
   1:percona-xtrabackup     ########################################### [100%]
[root@slave01 percona56]# 
[root@slave01 percona56]# innobackupex --version
innobackupex version 2.3.2 Linux (x86_64) (revision id: 306a2e0)
[root@slave01 percona56]# 

slave上确保安装好 percona-xtrabackup 软件

0 人点赞