MySql基本安装步骤:
| 1 2 3 4 5 6 7 | 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 |
注:--with-mysql-plugindir选项指定的插件库程序安装目录需要预先创建。
安装过程中遇到了2个问题:
1. 执行configure脚本的时候报错:
| 1 | configure: error: MySQL source version does not match MySQL binary version |
错误产生原因是:
configure 脚本中获取 MYSQL_SOURCE_VERSION 变量值的方式不完善,并不能根据 --with-mysql-source 选项指定源代码目录准确分析出版本号,获取代码片段为:
| 1 2 3 4 5 6 7 8 9 10 11 12 13 | 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 |
解决办法:
修改 configure 脚本,将检查源代码与二进制版本号是否一致的判断逻辑注释掉。
| 1 2 3 4 5 6 7 8 9 | # 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. 执行make时报错:
| 1 | libtool: link: only absolute run-paths are allowed |
上一篇:MySQL数据库十大优化技巧详解