Tips:
with-mysql-source 指定MySQL源码所在目录
with-mysql-bindir 表示MySQL二进制可执行文件目录
with-mysql-plugindir 指定MySQL插件的存储路径,如果不清楚这个目录在哪,可以按如下方法查询:
mysql> show variables like plugin%;
+---------------+-------------------------------------------+
| Variable_name | Value |
+---------------+-------------------------------------------+
| plugin_dir | /usr/local/webserver/mysql5520/lib/plugin |
+---------------+-------------------------------------------+
1 row in set (0.00 sec)
[root@iredmail HandlerSocket-Plugin-for-MySQL]# make
常见错误:
libtool: link: only absolute run-paths are allowed make[2]: *** [handlersocket.la] Error 1 make[2]: Leaving directory `/opt/HandlerSocket-Plugin-for-MySQL/handlersocket make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/opt/HandlerSocket-Plugin-for-MySQL make: *** [all] Error 2
解决方法:
[root@iredmail HandlerSocket-Plugin-for-MySQL]# vi handlersocket/Makefile
line 301:
$(handlersocket_la_LINK) -rpath $(pkgplugindir) $(handlersocket_la_OECTS) $(handlersocket_la_LIBADD) $(LIBS)
-->
$(handlersocket_la_LINK) -rpath /opt/HandlerSocket-Plugin-for-MySQL/handlersocket $( handlersocket_la_OECTS) $(handlersocket_la_LIBADD) $(LIBS)[root@iredmail HandlerSocket-Plugin-for-MySQL]#make install
完成后,mysql-plugindir目录下应有handlersocket相关文件
修改my.cnf配置文件:
[root@iredmail HandlerSocket-Plugin-for-MySQL]# vi /etc/my.cnf [mysqld] plugin-load=handlersocket.so(plugin-load可略过不配) 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 concurren connections, make open_files_limit as large as possible.
本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/jisuanjixue/article-27115-2.html
唉
你得知道“天高皇帝远”的道理
伊拉克跟俄合作