共计 4960 个字符,预计需要花费 13 分钟才能阅读完成。
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 Linux
Percona Server 跟 MySQL 一样有多种安装方法:yum Repositories、rpm、Binary Tarball、Source Tarball、Git Source Tree等,可以根据实际环境选择,具体安装步骤请参考官方文档。下文主要以 rpm 包在 RHEL 6 上的安装为例说明主要步骤
Installing Percona Server using rpm packages
1 下载软件包
wget https://www.percona.com/downloads/Percona-Server-5.6/Percona-Server-5.6.29-76.2/binary/redhat/6/x86_64/Percona-Server-5.6.29-76.2-rddf26fe-el6-x86_64-bundle.tar
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 (http://www.percona.com) 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.
Version: ‘5.6.29-76.2’ socket: ‘/var/lib/mysql/mysql.sock’ port: 3306 Percona Server (GPL), Release 76.2, Revision ddf26fe
7 卸载 Percona Server
1. Stop the Percona Server service
# /etc/init.d/mysql stop
Shutting down MySQL (Percona Server)..[OK]
2. Remove the packages
# rpm -qa|grep -i percona
Percona-Server-client-56-5.6.29-rel76.2.el6.x86_64
Percona-Server-server-56-5.6.29-rel76.2.el6.x86_64
Percona-Server-shared-56-5.6.29-rel76.2.el6.x86_64
# rpm -e Percona-Server-client-56-5.6.29-rel76.2.el6.x86_64 \
Percona-Server-server-56-5.6.29-rel76.2.el6.x86_64 \
Percona-Server-shared-56-5.6.29-rel76.2.el6.x86_64
# rpm -qa|grep -i percona
3. Remove the data and configuration files
# rm -rf /var/lib/mysql/ /etc/my.cnf
注:这里将删除所有的数据文件(databases, tables, logs, etc.),可能你环境中的 datafile 的位置并不是默认的 /var/lib/mysql,而是其他的目录,卸载的时候根据实际情况删除文件
如何在 CentOS 7 上安装 Percona Server http://www.linuxidc.com/Linux/2015-06/119144.htm
Percona Server 使用了一些 google-mysql-tools, Proven Scaling, Open Query 对 MySQL 进行改造。
CentOS 中编译安装 Percona Server 5.5.42 出现问题解决一例 http://www.linuxidc.com/Linux/2015-03/114279.htm
Percona Server 5.6 跟 5.5 的差异统计 http://www.linuxidc.com/Linux/2015-05/116975.htm
CentOS 中编译安装 Percona Server 5.5.42 出现问题解决一例 http://www.linuxidc.com/Linux/2015-03/114279.htm
Percona Server 的详细介绍:请点这里
Percona Server 的下载地址:请点这里
本文永久更新链接地址:http://www.linuxidc.com/Linux/2016-05/131113.htm