As an open-source database, MySql features low cost and ease of use. For individual users and small and medium-sized enterprises, MySQL provides more than enough functions, and because MySQL is open source software, it can greatly reduce the total cost of ownership. Next, let's take a look at the NoSQL plug-in HandlerSocket of MySQL.
Installation environment: FreeBSD 7.0-RELEASE + MySQL-5.1.33
Follow these steps to install MySql:
- cd ahiguti-HandlerSocket-Plugin-for-MySQL-635b930
-
- ./autogen.sh
- ./configure --with-mysql-source=/site/soft/mysql-5.1.33 --with-mysql-bindir=/data2/mysql5.1/bin --with-mysql-plugindir=/data2/mysql5.1/lib/plugin
-
- make && make install
Note: The installation directory of the plug-in library specified by the -- with-mysql-plugindir option must be created in advance.
Two problems encountered during installation:
1. An error is reported when the configure script is executed:
- configure: error: MySQL source version does not match MySQL binary version
The cause of the error is:
In the configure script, the method for obtaining the value of MYSQL_SOURCE_VERSION variable is incomplete. You cannot specify the source code directory to accurately analyze and publish the document number based on the -- with-mysql-source option. The obtained code snippet is:
- if test -f "$ac_mysql_source_dir/configure.in"; then
- MYSQL_SOURCE_VERSION=`cat $ac_mysql_source_dir/configure.in | grep "\[MySQL Server\]" | sed -e "s|.*\([0-9]\+\.[0-9]\+\.[0-9]\+[0-9a-zA-Z\_\-]*\).*|\1|"`
- else
- { { echo "$as_me:$LINENO: error: invalid MySQL source directory: $ac_mysql_source_dir" >&5 echo "$as_me: error: invalid MySQL source directory: $ac_mysql_source_dir" >&2;}
- { (exit 1); exit 1; }; }
- fi
Solution:
Modify the configure script and comment out the judgment logic that checks whether the source code is consistent with the binary version.
- # if test a$MYSQL_SOURCE_VERSION != a$MYSQL_BIN_VERSION ; then
- # { { echo "$as_me:$LINENO: error: MySQL source version does not match MySQL binary version" >&5
- echo "$as_me: error: MySQL source version does not match MySQL binary version" >&2;}
- # { (exit 1); exit 1; }; }
- # fi
2. An error is reported when you execute make:
- libtool: link: only absolute run-paths are allowed
This problem is probably caused by a problem with the libtool that comes with the HandlerSocket installation package. Replace it with the copy system.