diff --git a/plugins/mysql/versions/5.5/install.sh b/plugins/mysql/versions/5.5/install.sh index 3885af353..2d0d596ad 100755 --- a/plugins/mysql/versions/5.5/install.sh +++ b/plugins/mysql/versions/5.5/install.sh @@ -38,8 +38,8 @@ Install_mysql() fi MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') - if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then - if [ "${cpuCore}" -gt "${MEM_INFO}" ];then + if [ "${MEM_INFO}" != "0" ];then + if [ "${cpuCore}" -lt "${MEM_INFO}" ];then cpuCore="${MEM_INFO}" fi else diff --git a/plugins/mysql/versions/5.6/install.sh b/plugins/mysql/versions/5.6/install.sh index 40ac44c5d..2d9efb285 100755 --- a/plugins/mysql/versions/5.6/install.sh +++ b/plugins/mysql/versions/5.6/install.sh @@ -41,8 +41,8 @@ Install_mysql() fi MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') - if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then - if [ "${cpuCore}" -gt "${MEM_INFO}" ];then + if [ "${MEM_INFO}" != "0" ];then + if [ "${cpuCore}" -lt "${MEM_INFO}" ];then cpuCore="${MEM_INFO}" fi else diff --git a/plugins/mysql/versions/5.7/install.sh b/plugins/mysql/versions/5.7/install.sh index fb36229e8..de237fb09 100755 --- a/plugins/mysql/versions/5.7/install.sh +++ b/plugins/mysql/versions/5.7/install.sh @@ -43,8 +43,8 @@ Install_mysql() fi MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') - if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then - if [ "${cpuCore}" -gt "${MEM_INFO}" ];then + if [ "${MEM_INFO}" != "0" ];then + if [ "${cpuCore}" -lt "${MEM_INFO}" ];then cpuCore="${MEM_INFO}" fi else diff --git a/plugins/mysql/versions/8.0/install.sh b/plugins/mysql/versions/8.0/install.sh index f935d8a3a..0eeb0ed11 100755 --- a/plugins/mysql/versions/8.0/install.sh +++ b/plugins/mysql/versions/8.0/install.sh @@ -80,8 +80,8 @@ Install_mysql() fi MEM_INFO=$(free -m|grep Mem|awk '{printf("%.f",($2)/1024)}') - if [ "${cpuCore}" != "1" ] && [ "${MEM_INFO}" != "0" ];then - if [ "${cpuCore}" -gt "${MEM_INFO}" ];then + if [ "${MEM_INFO}" != "0" ];then + if [ "${cpuCore}" -lt "${MEM_INFO}" ];then cpuCore="${MEM_INFO}" fi else