Percona Server爲 MySQL 數據庫服務器進行了改進,在功能和性能上較 MySQL 有着很顯著的提高。該版本提高了在高負載狀況下的 InnoDB 的性能、爲 DBA 提供一些很是有用的性能診斷工具;另外有更多的參數和命令來控制服務器行爲。 —— 百度百科php
Xtrabackup是一個對InnoDB作數據備份的工具,支持在線熱備份(備份時不影響數據讀寫),是商業備份工具InnoDB Hotbackup的一個很好的替代品。 —— 百度百科html
rm -f yum.pid
1、Percona安裝過程當中可能會有些依賴包須要安裝python
Failed dependencies:
Percona-Server-client-57 is needed by Percona-Server-server-57-5.7.12-5.1.el7.x86_64
Percona-Server-shared-57 is needed by Percona-Server-client-57-5.7.12-5.1.
Percona-Server-shared-compat-57 is needed by Percona-Server-shared-57-5.7
mariadb-libs is obsoleted by Percona-Server-shared-compat-57-5.7.12-5.1.el7.x86_64mysql
2、首先,卸載廢棄的依賴包linux
yum remove mariadb*
3、而後依次安裝sql
rpm -ivh Percona-Server-shared-compat-57-5.7.12-5.1.el7.x86_64.rpm rpm -ivh Percona-Server-shared-57-5.7.12-5.1.el7.x86_64.rpm rpm -ivh Percona-Server-client-57-5.7.12-5.1.el7.x86_64.rpm rpm -ivh Percona-Server-server-57-5.7.12-5.1.el7.x86_64.rpm
4、啓動MySQL服務shell
service mysqld start
注意:Percona 5.7安裝完默認會產生個隨機的密碼,存在日誌中。這個問題曾困擾我一上午數據庫
cat /var/log/mysqld.log | grep "A temporary password" | awk -F " " '{print$11}'
查看方法:centos
rpm -ivh percona-xtrabackup-24-2.4.3-1.el7.x86_64.rpm
可能會出現下面錯誤提示信息:服務器
Failed dependencies:
libev.so.4()(64bit) is needed by percona-xtrabackup-24-2.4.3-1.el7.x86_64
perl(DBD::mysql) is needed by percona-xtrabackup-24-2.4.3-1.el7.x86_64
(1)解決 perl(DBD::mysql) :
yum install -y perl-DBD-MySQL
(2)解決 libev.so.4()(64bit)
能夠自行去rpmfind.net搜索系統所須要的rpm包進行下載安裝
wget ftp://rpmfind.net/linux/dag/redhat/el6/en/x86_64/dag/RPMS/libev-4.15-1.el6.rf.x86_64.rpm
OK,安裝完成
6、使用Xtrabackup備份
innobackupex --user=root --password=Pengyuanzhi --socket=/var/lib/mysql/mysql.sock /root
(1)Can't locate Digest/MD5.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at - line 693.
.pm其實是Perl的包,只需安裝以下軟件包便可:
yum -y install perl-Digest-MD5
大功告成:
若是對你有所幫助,請點個贊,支持下我 ^_^