- A+
所属分类:MySQL
一、下载安装
1 2 3 4 5 6 7 8 9 10 |
# wget? <a href="http://www.bhlaab.com/660/ahiguti-HandlerSocket-Plugin-for-MySQL-1.0.6-71-g159ea6d.tar.gz">http://www.bhlaab.com/938/ahiguti-HandlerSocket-Plugin-for-MySQL-1.0.6-71-g159ea6d.tar.gz</a> # tar zxvf ahiguti-HandlerSocket-Plugin-for-MySQL-1.0.6-71-g159ea6d.tar.gz # cd ahiguti-HandlerSocket-Plugin-for-MySQL-159ea6d # ./autogen.sh # ./configure --prefix=/usr/local/handlersocket \ # 指定安装目录 --with-mysql-source=/usr/local/src/software/mysql-5.1.36 \? # mysql源代码目录 --with-mysql-bindir=/usr/local/mysql-5.1.36/bin \ # mysql二进制程序目录(bin) --with-mysql-plugindir=/usr/local/mysql-5.1.36/lib/mysql/plugin \ # mysql插件目录 # make # make install |
二、修改配置文件
在my.cnf文件下增加以下配置:
1 2 3 4 5 |
[mysqld] loose_handlersocket_port? ?= 9998?? ?? ?# 指定读请求端口号 loose_handlersocket_port_wr? ?= 9999 ???# 指定写请求端口号 loose_handlersocket_threads? ?= 16?? ???# 指定读线程数目 loose_handlersocket_threads_wr ?= 1 ????# 指定写线程数目 |
三、安装handlersocket.so:
1 2 |
# mysql -uroot -p123456 mysql> INSTALL PLUGIN handlersocket SONAME 'handlersocket.so'; # 安装 |
四、查看进程状态
1 2 3 4 |
# netstat -ntpl tcp?????? 0????? 0 0.0.0.0:3306?????? 0.0.0.0:*??????? LISTEN????? 31402/mysqld tcp?????? 0????? 0 0.0.0.0:9998?????? 0.0.0.0:*??????? LISTEN????? 31402/mysqld tcp?????? 0????? 0 0.0.0.0:9999?????? 0.0.0.0:*??????? LISTEN????? 31402/mysqld |
五、常见问题
1)?configure: error: MySQL source version does not match MySQL binary version
解决方法,在configure.in文件中首行添加一行[MySQL Server] 5.1.36
转载请注明出处:http://www.bhlaab.com/html/101.html

微信公众号
扫一扫关注运维生存时间公众号,时时彩计划软件公式:获取最新技术文章~