在options.conf中修改了mysql的安装路径,运行install.sh进行安装,安装好后不能启动mysql,新目录为/opt/lnmp5/mysql和/opt/lnmp5/mysql_data,参看my.cnf和mysqld_safe、mysqld3个文件,发现在mysqld中,basedir=/opt/lnmp5/mysql ;datadir=/opt/lnmp5/mysql_data,但是
mysqld_pid_file_path=
if test -z "$basedir"
then
basedir=/usr/local/mysql
bindir=/usr/local/mysql/bin
if test -z "$datadir"
then
datadir=/usr/local/mysql/data
fi
sbindir=/usr/local/mysql/bin
libexecdir=/usr/local/mysql/bin
仍然是默认路径,同样在mysqld_safe中,basedir=/opt/lnmp5/mysql ;datadir=/opt/lnmp5/mysql_data,
但
if echo '/usr/local/mysql/share' | grep '^/usr/local/mysql' > /dev/null
then
relpkgdata=`echo '/usr/local/mysql/share' | sed -e 's,^/usr/local/mysql,,' -e 's,^/,,' -e 's,^,./,'`
else
# pkgdatadir is not relative to prefix
relpkgdata='/usr/local/mysql/share'
fi
case "$0" in
/*)
MY_PWD='/usr/local/mysql'
仍是默认路径。
mysqld_pid_file_path=
if test -z "$basedir"
then
basedir=/usr/local/mysql
bindir=/usr/local/mysql/bin
if test -z "$datadir"
then
datadir=/usr/local/mysql/data
fi
sbindir=/usr/local/mysql/bin
libexecdir=/usr/local/mysql/bin
仍然是默认路径,同样在mysqld_safe中,basedir=/opt/lnmp5/mysql ;datadir=/opt/lnmp5/mysql_data,
但
if echo '/usr/local/mysql/share' | grep '^/usr/local/mysql' > /dev/null
then
relpkgdata=`echo '/usr/local/mysql/share' | sed -e 's,^/usr/local/mysql,,' -e 's,^/,,' -e 's,^,./,'`
else
# pkgdatadir is not relative to prefix
relpkgdata='/usr/local/mysql/share'
fi
case "$0" in
/*)
MY_PWD='/usr/local/mysql'
仍是默认路径。
4 Answers
报错信息是找不到/usr/local/mysql/bin/mysqld,实际路径为/opt/lnmp5/mysql/bin/mysqld。
经过多次重复调整安装,基本确认问题是mysql安装包选择二进制模式安装导致的路径不能完全变更,选址编译模式安装目录变更正常。
经过多次重复调整安装,基本确认问题是mysql安装包选择二进制模式安装导致的路径不能完全变更,选址编译模式安装目录变更正常。
Please login or Register to submit your answer