centos5.5下如何安装mysql HandlerSocket?

运维 系统运维
CentOS是RHEL(RedHatEnterpriseLinux)源代码再编译的产物,而且在RHEL的基础上修正了不少已知的Bug,相对于其他Linux发行版,其稳定性值得信赖。HandlerSocket是mysql的一个插件,具体的功能大家上网去查。现在记录一下在安装过程中遇到的一些问题:

CentOS是RHEL(RedHatEnterpriseLinux)源代码再编译的产物,而且在RHEL的基础上修正了不少已知的Bug,相对于其他Linux发行版,其稳定性值得信赖。HandlerSocket是mysql的一个插件,具体的功能大家上网去查。现在记录一下在centos5.5下安装mysql HandlerSocket过程中遇到的一些问题:

1、HandlerSocket必需要在mysql5.1的版本上安装

2、下载ahiguti-HandlerSocket-Plugin-for-MySQL-1.0.6-88-gefd9972.tar.gz

3、下载mysql5.1.58.tar.gz

4、按照正常的方法安装mysql

一开始用这些参数编译

 

  1. ./configure--prefix=/usr/local/mysql--with-extra-charsets=complex--with-mysqld-ldflags=-all-static--with-client-ldflags=-all-static 

 

但是在安装插件的时候就报”ERROR1289(HY000):The‘plugin’featureisdisabled;youneedMySQLbuiltwith‘HAVE_DLOPEN’tohaveitworking”,上网查了一下说要编译前要运行下面命令:

 

  1. exportCFLAGS=”-O2-DHAVE_DLOPEN=1″  
  2.  
  3. exportCXXFLAGS=”-O2-DHAVE_DLOPEN=1″ 

 

运行完之后,编译就没有法编译,后来需要把”–with-mysqld-ldflags=-all-static–with-client-ldflags=-all-static”这些静态化的参数取消,才得以通过。

 

  1. ./configure--prefix=/usr/local/mysql--with-extra-charsets=complex--with-plugins=all--enable-thread-safe-client 

 

5、安装HandlerSocket

解压,然后运行./autogen.sh

 

  1. cat/usr/share/aclocal/libtool.m4>>aclocal.m4  
  2.  
  3. ./configure--prefix=/usr/local/handlersocket--with-mysql-source=/root/mysql-5.1.58--with-mysql-bindir=/usr/local/mysql/bin--with-mysql-plugindir=/usr/local/mysql/lib/mysql/plugin  
  4.  
  5. make  
  6.  
  7. makeinstall 

 

这样它会在/usr/local/mysql/lib/mysql/plugin生成一些handlersocket文件

6、进入mysql,运行

 

  1. mysql>installpluginhandlersocketsoname'handlersocket.so'; 

 

7、vi/etc/my.cnf增加如下内容:

 

  1. loose_handlersocket_port=9998 
  2.  
  3. #theportnumbertobindto(forreadrequests)  
  4.  
  5. loose_handlersocket_port_wr=9999 
  6.  
  7. #theportnumbertobindto(forwriterequests)  
  8.  
  9. loose_handlersocket_threads=16 
  10.  
  11. #thenumberofworkerthreads(forreadrequests)  
  12.  
  13. loose_handlersocket_threads_wr=1 
  14.  
  15. #thenumberofworkerthreads(forwriterequests)  
  16.  
  17. open_files_limit=65535 

总结:

希望本文介绍的centos5.5下安装mysql HandlerSocket的内容能够对读者有所帮助,更多有关linux系统的知识还有待于读者去探索和学习。

责任编辑:韩亚珊 来源: 博客转载
相关推荐

2011-03-11 12:57:34

2011-03-11 10:39:09

CentOS 5.5安装LAMP

2011-03-11 12:57:28

CentOS5.5YUMLAMP

2011-04-06 09:16:05

2011-04-01 14:09:44

CentOS 5.5zabbix

2015-09-24 13:23:21

安装cobblerCentos

2021-06-29 12:10:48

CentOSMySQL工具

2013-04-10 15:12:03

MySQL 5.6

2010-11-19 09:30:29

2010-05-14 15:14:10

安装Subversio

2020-11-03 14:50:18

CentOSMySQL 8.0数去库

2011-09-19 14:57:16

2011-05-16 10:13:29

HandlerSock

2012-10-11 14:59:31

CentosFastDFS

2010-03-29 17:08:28

CentOS系统

2011-02-15 10:44:27

2011-03-02 09:52:03

2011-04-12 09:23:29

CentOS 5.6

2017-07-05 15:00:51

CentosLinuxMysql

2011-01-18 14:19:59

rsyncCentOS 5.5
点赞
收藏

51CTO技术栈公众号