mysql安装失败删除源文件,避免重安装时报错。

This commit is contained in:
midoks 2022-06-30 12:23:12 +08:00
parent 9c1254b02b
commit 2edc467b17
5 changed files with 15 additions and 4 deletions

View File

@ -36,7 +36,7 @@ fi
sh -x $curPath/versions/$2/install.sh $1
if [ "${action}" == "install" ];then
if [ "${action}" == "install" ] && [ -d $serverPath/mysql ];then
#初始化
cd ${rootPath} && python3 ${rootPath}/plugins/mysql/index.py start ${type}
cd ${rootPath} && python3 ${rootPath}/plugins/mysql/index.py initd_install ${type}

View File

@ -64,6 +64,7 @@ Install_mysql()
echo '5.5' > $serverPath/mysql/version.pl
echo '安装完成' > $install_tmp
else
rm -rf ${mysqlDir}/mysql-5.5.62
echo '安装失败' > $install_tmp
fi
fi

View File

@ -69,6 +69,7 @@ Install_mysql()
echo '5.6' > $serverPath/mysql/version.pl
echo '安装完成' > $install_tmp
else
rm -rf ${mysqlDir}/mysql-5.6.50
echo '安装失败' > $install_tmp
fi
fi

View File

@ -79,8 +79,14 @@ Install_mysql()
-DCMAKE_CXX_COMPILER=/usr/bin/g++ \
-DWITH_BOOST=${mysqlDir}/mysql-${VERSION}/boost/
make clean && make && make install && make clean
echo '5.7' > $serverPath/mysql/version.pl
echo '安装完成' > $install_tmp
if [ -d $serverPath/mysql ];then
echo '5.7' > $serverPath/mysql/version.pl
echo '安装完成' > $install_tmp
else
rm -rf ${mysqlDir}/mysql-${VERSION}
echo '安装失败' > $install_tmp
fi
fi
}

View File

@ -83,8 +83,11 @@ Install_mysql()
if [ -d $serverPath/mysql ];then
echo '8.0' > $serverPath/mysql/version.pl
echo '安装完成' > $install_tmp
else
rm -rf ${mysqlDir}/mysql-8.0.25
echo '安装失败' > $install_tmp
fi
echo '安装完成' > $install_tmp
fi
}