您好,欢迎访问一九零五行业门户网

Centos 6.5 Percona 5.6.27 Tokudb 配置_MySQL

# wget https://www.percona.com/downloads/percona-server-5.6/percona-server-5.6.27-75.0/binary/tarball/percona-server-5.6.27-rel75.0-linux.x86_64.ssl101.tar.gz
解压到 /usr/local,创建符号链接 /usr/local/percona
启动出错 /usr/local/percona/bin/mysqld: error while loading shared libraries: libnuma.so.1: cannot open shared object file: no such file or directory
解决:查找   # yum search libnuma
numactl.x86_64 : library for tuning for non uniform memory access machines
numactl-devel.x86_64 : development package for building applications that use numa
安装 yum install numactl
启动出新错误 [error] tokudb is not initialized because jemalloc is not loaded
解决:安装yum扩展源 epel即extra packages for enterprise linux
# rpm -ivh http://mirrors.sohu.com/fedora-epel/6/x86_64/epel-release-6-8.noarch.rpm
# yum install jemalloc 安装了 jemalloc-3.6.0-1.el6.x86_64
# rpm -ql jemalloc-3.6.0-1.el6.x86_64 查看库所在具体路径
/usr/lib64/libjemalloc.so.1
# vi /etc/my.cnf
[mysqld_safe]
malloc-lib=/usr/lib64/libjemalloc.so.1
[mysqld]
...
plugin-dir = /usr/local/percona/lib/mysql/plugin
plugin-load=ha_tokudb.so
tokudb_row_format = tokudb_fast
tokudb_cache_size = 1g
tokudb_commit_sync = 0
tokudb_directio = 1
tokudb_read_block_size = 128k
tokudb_read_buf_size = 128k
#把tokudb datadir以及logdir和mysql的datadir分开,美观点
tokudb-data-dir = /data/mysql/tokudb/data
tokudb-log-dir  = /data/mysql/tokudb/log
禁用 transparent_hugepage
# vi /etc/rc.local 为了立即生效,还要手工执行下这两句
echo never > /sys/kernel/mm/transparent_hugepage/enabled
echo never > /sys/kernel/mm/transparent_hugepage/defrag
启动成功后安装tokudb
# cd /usr/local/percona/bin
# ./ps_tokudb_admin --enable -uroot -ppassw0rd
mysql: error while loading shared libraries: libreadline.so.5: cannot open shared object file: no such file or directory
ldd /usr/local/percona/bin/mysql
linux-vdso.so.1 =>  (0x00007fff197a5000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f422479d000)
libreadline.so.5 => not found
解决办法 yum install compat-readline5-devel
安装成功后查看 mysql> show engines;
| tokudb | yes | tokutek tokudb storage engine with fractal tree(tm) technology | yes | yes | yes |
...
其它类似信息

推荐信息