Percona XtraDB是 InnoDB 存储引擎的增强版,被设计用来更好的使用更新计算机硬件系统的性能,同时还包含有一些在高性能环境下的新特性。XtraDB 存储引擎是完全的向下兼容,于是完全可以使用XtraDB来替代InnoDB存储引擎。
Percona XtraDB 包含有所有 InnoDB's 健壮性,可依赖的 ACID 兼容设计和高级 MVCC 架构。XtraDB 在 InnoDB 的坚实基础上构建,使 XtraDB 具有更多的特性,更好调用,更多的参数指标和更多的扩展。
尤其是,XtraDB 被设计用来在多核心的条件下更有效的使用内存和更加方便,更加可用。也解除了InnoDB的很多限制;提供了比InnoDB更多的配置和性能监控参数。
Percona XtraDB engine包含在Percona Server and MariaDB中。
Installing Percona Server on Red Hat Enterprise LinuxPercona Server跟MySQL一样有多种安装方法:yum Repositories、rpm、Binary Tarball、Source Tarball、Git Source Tree等,可以根据实际环境选择,具体安装步骤请参考官方文档。下文主要以rpm包在RHEL 6上的安装为例说明主要步骤
Installing Percona Server using rpm packages 1下载软件包 2 解压tar包# tar -xvf Percona-Server-5.6.29-76.2-rddf26fe-el6-x86_64-bundle.tar
# ls *.rpm
Percona-Server-56-debuginfo-5.6.29-rel76.2.el6.x86_64.rpm
Percona-Server-server-56-5.6.29-rel76.2.el6.x86_64.rpm
Percona-Server-tokudb-56-5.6.29-rel76.2.el6.x86_64.rpm
Percona-Server-client-56-5.6.29-rel76.2.el6.x86_64.rpm
Percona-Server-shared-56-5.6.29-rel76.2.el6.x86_64.rpm
Percona-Server-devel-56-5.6.29-rel76.2.el6.x86_64.rpm
Percona-Server-test-56-5.6.29-rel76.2.el6.x86_64.rpm
3 安装Percona Server#rpm -ivh Percona-Server-server-56-5.6.29-rel76.2.el6.x86_64.rpm \
Percona-Server-client-56-5.6.29-rel76.2.el6.x86_64.rpm \
Percona-Server-shared-56-5.6.29-rel76.2.el6.x86_64.rpm
#以上三个rpm包仅仅为了完成Percona server的安装
#若需要(包含debugging, testing,etc等),则直接安装所有的rpm包即可
#rpm -ivh *.rpm
附:RHEL6上安装报错:libcrypto.so.10和libssl.so.10
error: Failed dependencies:
libcrypto.so.10(libcrypto.so.10)(64bit) is needed by Percona-Server-client-56-5.6.29-rel76.2.el6.x86_64
libssl.so.10(libssl.so.10)(64bit) is needed by Percona-Server-client-56-5.6.29-rel76.2.el6.x86_64
libcrypto.so.10(libcrypto.so.10)(64bit) is needed by Percona-Server-shared-56-5.6.29-rel76.2.el6.x86_64
libssl.so.10(libssl.so.10)(64bit) is needed by Percona-Server-shared-56-5.6.29-rel76.2.el6.x86_64
#RedHat EL6自带openssl-1.0.0版本,对于Percona-Server应该安装openssl-1.0.1的版本,安装新版本后,问题解决
# rpm -ivh openssl10-libs-1.0.1e-1.ius.el6.x86_64.rpm --force
warning: openssl10-libs-1.0.1e-1.ius.el6.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 9cd4953f: NOKEY
Preparing... ########################################### [100%]
1:openssl10-libs ########################################### [100%]
4 配置文件Percona Server默认的数据文件路径在/var/lib/mysql/下
#编辑配置文件/etc/my.cnf
# cat /etc/my.cnf
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
log-error=/var/log/mysqld.log
innodb_buffer_pool_size = 128M
注:配置文件有很多选项,具体的根据实际需求配置,此处只是简单配置了下而已
5 运行Percona Server 1. Starting the service# /etc/init.d/mysql start
Starting MySQL (Percona Server).............[ OK ]
2. Confirming that service is running# /etc/init.d/mysql status
MySQL (Percona Server) running (3369)[ OK ]
3. Stopping the service# /etc/init.d/mysql stop
Shutting down MySQL (Percona Server)..[ OK ]
4. Restarting the service# /etc/init.d/mysql restart
Shutting down MySQL (Percona Server)..[ OK ]
Starting MySQL (Percona Server).....[ OK ]
6 查看log# tail -f /var/log/mysqld.log
2016-05-03 16:28:23 3595 [Note] InnoDB: Percona XtraDB () 5.6.29-76.2 started; log sequence number 1626007
2016-05-03 16:28:23 3595 [Note] RSA private key file not found: /var/lib/mysql//private_key.pem. Some authentication plugins will not work.
2016-05-03 16:28:23 3595 [Note] RSA public key file not found: /var/lib/mysql//public_key.pem. Some authentication plugins will not work.
2016-05-03 16:28:23 3595 [Note] Server hostname (bind-address): '*'; port: 3306
2016-05-03 16:28:23 3595 [Note] IPv6 is available.
2016-05-03 16:28:23 3595 [Note] - '::' resolves to '::';
2016-05-03 16:28:23 3595 [Note] Server socket created on IP: '::'.
2016-05-03 16:28:23 3595 [Note] Event Scheduler: Loaded 0 events
2016-05-03 16:28:23 3595 [Note] /usr/sbin/mysqld: ready for connections.