mysql衍生版_编译安装MySQL衍生版 Percona Server

Percona 为 MySQL 数据库服务器进行了改进,在功能和性能上较 MySQL 有着很显著的提升。该版本提升了在高负载情况下的 InnoDB 的性能、为 DBA 提供一些非常有用的性能诊断工具;另外有更多的参数和命令来控制服务器行为。

Percona Server 只包含 MySQL 的服务器版,并没有提供相应对 MySQL 的 Connector 和 GUI 工具进行改进。

Percona Server 使用了一些 google-mysql-tools, Proven Scaling, Open Query 对 MySQL 进行改造。

官方性能测试对比:

一、下载相关软件

bison(bison是一个自由软件,用于自动生成语法分析器程序,实际上可用于所有常见的操作系统)

编译工具cmake(MySQL5.5版本改为跨平台的cmake编译)

Percona-Server-5.5.22-rel25.2

二、安装依赖软件:

[root@DBs software]# yum install gcc gcc-c++ ncurses ncurses-devel -y

[root@DBs software]# tar zxvf cmake-2.8.8.tar.gz

[root@DBs software]# tar bison-2.5.tar.gz

[root@DBs software]# cd cmake-2.8.8

[root@DBs cmake-2.8.8]# ./bootstrap && make && make install

[root@DBs cmake-2.8.8]# cd ../bison-2.5

[root@DBs bison-2.5]# ./config && make && make install

[root@DBs bison-2.5]# cd ..

[root@DBs software]# tar zxvf Percona-Server-5.5.22-rel25.2

[root@DBs software]# cd Percona-Server-5.5.22-rel25.2

添加mysql账户

[root@DBs Percona-Server-5.5.22-rel25.2]# /usr/sbin/groupadd mysql

[root@DBs Percona-Server-5.5.22-rel25.2]# /usr/sbin/useradd -g mysql mysql

Cmke编译环境

[root@DBs Percona-Server-5.5.22-rel25.2]# cmake -DCMAKE_INSTALL_PREFIX=/opt/hx/mysql \

> -DSYSCONFDIR=/opt/hx/mysql/etc \

> -DMYSQL_DATADIR=/opt/hx/mysql/data \

> -DDEFAULT_CHARSET=gbk \

> -DDEFAULT_COLLATION=gbk_chinese_ci \

> -DWITH_INNOBASE_STORAGE_ENGINE=1 \

> -DWITH_PERFSCHEMA_STORAGE_ENGINE=1 \

> -DWITH_PARTITION_STORAGE_ENGINE=1

参数这里不再详解,参看编译工具configure向cmake过渡指南:

如果编译有错误重新编译需要先做如下操作:

[root@DBs Percona-Server-5.5.22-rel25.2]# make clean

[root@DBs Percona-Server-5.5.22-rel25.2]# rm -f CMakeCache.txt

编译安装Percona-Server:

[root@DBs Percona-Server-5.5.22-rel25.2]# make && make install

[root@DBs Percona-Server-5.5.22-rel25.2]# cd support-files/

[root@DBs support-files]# cp my-large.cnf /etc/my.cnf

[root@DBs support-files]# cp mysql.server /etc/init.d/mysqld

[root@DBs support-files]# chmod 755 /etc/init.d/mysqld

[root@DBs support-files]# /opt/hx/mysql/scripts/mysql_install_db --defaults-file=/opt/hx/mysql/etc/my.cnf --basedir=/opt/hx/mysql/ --datadir=/opt/hx/mysql/data/ --user=mysql

[root@DBs support-files]# /opt/hx/mysql//bin/mysqld_safe --user=mysql&

验证mysql启动状态:

[root@DBs ~]# /etc/init.d/mysqld status

MySQL (Percona Server) running (32611) [ OK ]

[root@DBs ~]# netstat -nlt|grep 3306

tcp 0 0 :::3306 :::* LISTEN

使用mysqld脚本管理 mysql参数:

[root@DBs ~]# /etc/init.d/mysqld

Usage: mysqld {start|stop|restart|reload|force-reload|status} [ MySQL (Percona Server) options ]

本文转自pandazhai 51CTO博客,原文链接:http://blog.51cto.com/dreamway/1045561

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值