安装Mysql
PREFIX=/opt/app
tar zxvf mysql-5.1.51.tar.gz
cd mysql-5.1.51
./configure –prefix=$PREFIX/mysql-5.1.51 –enable-assembler –with-client-ldflags=-all-static –with-unix-socket-path=/tmp/mysql.sock –with-charset=utf8 –enable-thread-safe-client –with-pthread –without-debug –with-big-tables –enable-community-features –enable-profiling –enable-local-infile –with-fast-mutexes –with-plugins=innobase,innodb_plugin && \
make -j 5 && \
strip sql/mysqld && \
make install && \
cd $PREFIX/mysql-5.1.51 && \
bin/mysql_install_db –user=mysql && \
cd ..
安装HandlerSocket
tar zxvfp ahiguti-HandlerSocket-Plugin-for-MySQL-a25ce9a.tar.gz && \
cd ahiguti-HandlerSocket-Plugin-for-MySQL-a25ce9a && \
./autogen.sh
./configure –prefix=$PREFIX/HandlerSocket-Plugin –with-mysql-source=/home/kingnet/mysql/mysql-5.1.51 –with-mysql-bindir=$PREFIX/mysql-5.1.51/bin –with-mysql-plugindir=$PREFIX/mysql-5.1.51/lib/mysql/plugin && \
make && make install
修改my.conf配置
[mysqld]
loose_handlersocket_port = 9998
# the port number to bind to (for read requests)
loose_handlersocket_port_wr = 9999
# the port number to bind to (for write requests)
loose_handlersocket_threads = 16
# the number of worker threads (for read requests)
loose_handlersocket_threads_wr = 1
# the number of worker threads (for write requests)
open_files_limit = 65535
# to allow handlersocket accept many concurrent
# connections, make open_files_limit as large as
# possible.
在mysql里加载HandlerSocket插件:
mysql> INSTALL PLUGIN handlersocket SONAME ‘handlersocket.so’;
mysql>SHOW PLUGINS; # 查看插件是否加载成
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7682812/viewspace-683085/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/7682812/viewspace-683085/